42 lines
992 B
C#
42 lines
992 B
C#
using cfg.SummonCfg;
|
|
using Gameplay.Common;
|
|
using Gameplay.Unit;
|
|
using UnityEngine;
|
|
|
|
namespace Gameplay.Summon
|
|
{
|
|
|
|
public class SummonTent : BaseSummon
|
|
{
|
|
|
|
public float triggerInterval = 2f;
|
|
|
|
public int checkDistance;
|
|
public int bulletId;
|
|
|
|
public SummonTent(DataSummon configData, uint id, GameUnit creator)
|
|
: base(configData, id, creator)
|
|
{
|
|
avatarType = EAvatarType.Building;
|
|
}
|
|
|
|
protected override void _OnInitFsm()
|
|
{
|
|
base._OnInitFsm();
|
|
_fsm.Add(new SummonStateTent(this));
|
|
|
|
_fsm.ChangeState(ESummonState.Tent);
|
|
}
|
|
|
|
protected override void _OnInited()
|
|
{
|
|
base._OnInited();
|
|
// 初始化基础值
|
|
triggerInterval = configData.FloatParams[0];
|
|
checkDistance = Mathf.RoundToInt(configData.FloatParams[1]);
|
|
bulletId = Mathf.RoundToInt(configData.FloatParams[2]);
|
|
}
|
|
|
|
}
|
|
}
|