52 lines
1.5 KiB
C#
52 lines
1.5 KiB
C#
using cfg.SummonCfg;
|
|
using Gameplay.Skill;
|
|
namespace Gameplay.Summon
|
|
{
|
|
public class SummonTent2 : BaseSummon
|
|
{
|
|
|
|
// old start
|
|
public float triggerInterval = 2f;
|
|
|
|
public int emitBulletId;
|
|
public int areaId;
|
|
// old end
|
|
|
|
// new start
|
|
public float recoverCD = 10f; // cd剩余时间
|
|
public int checkDistance = 3; // 检测距离
|
|
public float triggerValue = 0.15f; // 护甲值低于多少触发
|
|
public float recoverValueA = 1f; // 恢复值参数A
|
|
public float recoverValueB = 0.5f; // 恢复值参数B
|
|
// new end
|
|
|
|
public SummonTent2(DataSummon configData, uint id, SkillHandle skillHandle)
|
|
: base(configData, id, skillHandle.owner.commonData.troopId, skillHandle)
|
|
{
|
|
avatarType = Common.EAvatarType.Building;
|
|
}
|
|
|
|
protected override void _OnInitFsm()
|
|
{
|
|
base._OnInitFsm();
|
|
_fsm.Add(new SummonStateTent2(this));
|
|
|
|
_fsm.ChangeState(ESummonState.Tent2);
|
|
}
|
|
|
|
protected override void _OnInited()
|
|
{
|
|
base._OnInited();
|
|
// 初始化基础值
|
|
var skill = createSkill;
|
|
var skillConfig = skill.runtimeData.configData;
|
|
|
|
triggerInterval = skillConfig.FloatParams[0];
|
|
|
|
emitBulletId = skillConfig.IntParams[0];
|
|
areaId = skillConfig.IntParams[1];
|
|
}
|
|
|
|
}
|
|
}
|