2024-09-10 13:02:18 +08:00
|
|
|
|
using Gameplay.Building.Impl.Common;
|
|
|
|
|
|
using Gameplay.Building.Impl.Trap;
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
namespace Gameplay.Building.Impl
|
2024-09-09 19:22:22 +08:00
|
|
|
|
{
|
|
|
|
|
|
public class BuildTrap : UnitBuild
|
|
|
|
|
|
{
|
|
|
|
|
|
|
2024-09-10 13:02:18 +08:00
|
|
|
|
public int bulletId;
|
|
|
|
|
|
|
2024-09-09 19:22:22 +08:00
|
|
|
|
public BuildTrap(uint id,
|
|
|
|
|
|
int troopId) : base(id, troopId)
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
2024-09-10 13:02:18 +08:00
|
|
|
|
|
|
|
|
|
|
protected override void _InitFsm()
|
|
|
|
|
|
{
|
|
|
|
|
|
base._InitFsm();
|
|
|
|
|
|
|
|
|
|
|
|
_fsm.Add(new TrapStateIdle(this));
|
|
|
|
|
|
_fsm.Add(new CommonBuildStateDestroy(this));
|
|
|
|
|
|
_fsm.Add(new CommonBuildStateWaitRemove(this));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected override void _AfterInitConfig()
|
|
|
|
|
|
{
|
|
|
|
|
|
base._AfterInitConfig();
|
|
|
|
|
|
|
|
|
|
|
|
bulletId = Mathf.RoundToInt(configData.rawConfig.FloatParams[0]);
|
|
|
|
|
|
}
|
2024-09-09 19:22:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|