补全防御塔组装与介绍描述功能
- RepoForm.CombineArea:防御塔组装,直接继承所有组件的属性 - ItemDescUtility:根据属性构建不同的 ItemDescForm 的文本
This commit is contained in:
+7
-7
@@ -5,25 +5,25 @@ using UnityEngine;
|
||||
namespace GeometryTD.Entity.EntityData
|
||||
{
|
||||
[Serializable]
|
||||
public class DefenseTowerData : EntityDataBase
|
||||
public class TowerData : EntityDataBase
|
||||
{
|
||||
[SerializeField] private DefenseTowerStatsData _stats = new DefenseTowerStatsData();
|
||||
[SerializeField] private TowerStatsData _stats = new TowerStatsData();
|
||||
[SerializeField] private int _towerLevel = 0;
|
||||
|
||||
public DefenseTowerData(int entityId, int typeId, Vector3 position, Quaternion rotation,
|
||||
DefenseTowerStatsData stats, int towerLevel = 0)
|
||||
public TowerData(int entityId, int typeId, Vector3 position, Quaternion rotation,
|
||||
TowerStatsData stats, int towerLevel = 0)
|
||||
: base(entityId, typeId)
|
||||
{
|
||||
Position = position;
|
||||
Rotation = rotation;
|
||||
_stats = stats ?? new DefenseTowerStatsData();
|
||||
_stats = stats ?? new TowerStatsData();
|
||||
_towerLevel = Mathf.Max(0, towerLevel);
|
||||
}
|
||||
|
||||
public DefenseTowerStatsData Stats
|
||||
public TowerStatsData Stats
|
||||
{
|
||||
get => _stats;
|
||||
set => _stats = value ?? new DefenseTowerStatsData();
|
||||
set => _stats = value ?? new TowerStatsData();
|
||||
}
|
||||
|
||||
public int TowerLevel
|
||||
Reference in New Issue
Block a user