39 lines
1.0 KiB
C#
39 lines
1.0 KiB
C#
using System.Collections.Generic;
|
|
using Gameplay.Building.Impl.Common;
|
|
using Gameplay.Building.Impl.WatchTower;
|
|
using UnityEngine;
|
|
namespace Gameplay.Building.Impl
|
|
{
|
|
public class BuildWatchTower : UnitBuild
|
|
{
|
|
|
|
public List<int> buffIds = new List<int>();
|
|
|
|
public BuildWatchTower(uint id, int troopId) : base(id, troopId)
|
|
{
|
|
}
|
|
|
|
protected override void _InitFsm()
|
|
{
|
|
base._InitFsm();
|
|
|
|
_fsm.Add(new WatchTowerStateIdle(this));
|
|
_fsm.Add(new CommonBuildStateDestroy(this));
|
|
_fsm.Add(new CommonBuildStateWaitRemove(this));
|
|
}
|
|
|
|
protected override void _AfterInitConfig()
|
|
{
|
|
base._AfterInitConfig();
|
|
|
|
for (int i = 0; i < configData.rawConfig.FloatParams.Count; i++)
|
|
{
|
|
var floatValue = configData.rawConfig.FloatParams[i];
|
|
var intValue = Mathf.RoundToInt(floatValue);
|
|
buffIds.Add(intValue);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|