更新
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Cielonos.MainGame.Inventory;
|
||||
using DamageNumbersPro;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
@@ -6,11 +7,35 @@ using UnityEngine;
|
||||
namespace Cielonos.MainGame
|
||||
{
|
||||
[CreateAssetMenu(fileName = "BasePrefabsCollection", menuName = "Cielonos/MainGame/BasePrefabsCollection")]
|
||||
public class BasePrefabsCollection : SerializedScriptableObject
|
||||
public partial class BasePrefabsCollection : SerializedScriptableObject
|
||||
{
|
||||
public GameObject audioPoint;
|
||||
public Dictionary<string, DamageNumber> hudTextCollection;
|
||||
|
||||
public Dictionary<BreakthroughType, Color> outlineColorCollection;
|
||||
|
||||
public Dictionary<ItemRarity, Color> itemRarityColorCollection;
|
||||
}
|
||||
|
||||
public partial class BasePrefabsCollection
|
||||
{
|
||||
public DamageNumber GetHudTextPrefab(AttackType attackType, bool isCritical)
|
||||
{
|
||||
string prefix = "DN";
|
||||
string typeStr = attackType.ToString();
|
||||
string criticalStr = isCritical ? "Critical" : "Normal";
|
||||
string dnKey = $"{prefix}_{typeStr}_{criticalStr}";
|
||||
if (hudTextCollection.TryGetValue(dnKey, out var hudTextPrefab))
|
||||
{
|
||||
return hudTextPrefab;
|
||||
}
|
||||
|
||||
throw new KeyNotFoundException($"HUD Text Prefab with key '{dnKey}' not found in BasePrefabsCollection.");
|
||||
}
|
||||
|
||||
public DamageNumber GetInfoTextPrefab()
|
||||
{
|
||||
return hudTextCollection.GetValueOrDefault("Info_Normal");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,6 @@ namespace Cielonos.MainGame
|
||||
{
|
||||
if (attackArea.creator.fraction == Fraction.Player)
|
||||
{
|
||||
Debug.Log($"Registered AttackArea: {attackArea.areaName}");
|
||||
playerAttackAreas.Add(attackArea);
|
||||
}
|
||||
else if (attackArea.creator.fraction == Fraction.Enemy)
|
||||
@@ -34,7 +33,6 @@ namespace Cielonos.MainGame
|
||||
{
|
||||
if (attackArea.creator.fraction == Fraction.Player)
|
||||
{
|
||||
Debug.Log($"Unregistered AttackArea: {attackArea.areaName}");
|
||||
playerAttackAreas.Remove(attackArea);
|
||||
}
|
||||
else if (attackArea.creator.fraction == Fraction.Enemy)
|
||||
|
||||
@@ -1,2 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1fd3eac588b1eaf4a858946bb8f55f1f
|
||||
guid: 1fd3eac588b1eaf4a858946bb8f55f1f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: -10
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
@@ -1,2 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 291d344c032eb6d49a1a85ec924ac613
|
||||
guid: 291d344c032eb6d49a1a85ec924ac613
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: -30
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
@@ -6,10 +6,20 @@ namespace Cielonos.MainGame
|
||||
{
|
||||
public class TimeManager : Singleton<TimeManager>
|
||||
{
|
||||
public FloatReactiveProperty globalTimeScale = new FloatReactiveProperty(1f);
|
||||
public FloatReactiveProperty playerTimeScale = new FloatReactiveProperty(1f);
|
||||
public FloatReactiveProperty alliedMinionTimeScale = new FloatReactiveProperty(1f);
|
||||
public FloatReactiveProperty nonPlayerTimeScale = new FloatReactiveProperty(1f);
|
||||
public FloatReactiveProperty enemyTimeScale = new FloatReactiveProperty(1f);
|
||||
public FloatReactiveProperty globalTimeScale;
|
||||
public FloatReactiveProperty playerTimeScale;
|
||||
public FloatReactiveProperty alliedMinionTimeScale;
|
||||
public FloatReactiveProperty nonPlayerTimeScale;
|
||||
public FloatReactiveProperty enemyTimeScale;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
globalTimeScale = new FloatReactiveProperty(1f);
|
||||
playerTimeScale = new FloatReactiveProperty(1f);
|
||||
alliedMinionTimeScale = new FloatReactiveProperty(1f);
|
||||
nonPlayerTimeScale = new FloatReactiveProperty(1f);
|
||||
enemyTimeScale = new FloatReactiveProperty(1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 588340523f272b040ac2333d06c0443b
|
||||
guid: 588340523f272b040ac2333d06c0443b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: -20
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
Reference in New Issue
Block a user