NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/Summon/Impl/SummonDelayEmitBulletToSelf.cs

34 lines
919 B
C#

using cfg.SummonCfg;
using Gameplay.Common;
using Gameplay.Summon.Logic;
using Gameplay.Unit;
namespace Gameplay.Summon
{
public class SummonDelayEmitBulletToSelf : LogicCombineSummon
{
private float _delayTime;
private int _bulletId;
public SummonDelayEmitBulletToSelf(DataSummon configData,
uint id,
GameUnit creator) : base(configData, id, creator)
{
avatarType = EAvatarType.Building;
_delayTime = _ReatFloatParam(0);
_bulletId = _ReadIntParam(1);
}
protected override void _OnInited()
{
base._OnInited();
var delayEmitBulletLogic = new SLogicDelayEmitBulletToSelf(this);
delayEmitBulletLogic.bulletId = _bulletId;
delayEmitBulletLogic.delayTime = _delayTime;
_AddLogic(delayEmitBulletLogic);
}
}
}