47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
using cfg.SummonCfg;
|
|
using Gameplay.Common;
|
|
using Gameplay.Summon.Logic;
|
|
using Gameplay.Unit;
|
|
namespace Gameplay.Summon
|
|
{
|
|
public class SummonTotem1 : LogicCombineSummon
|
|
{
|
|
|
|
/// <summary>
|
|
/// 嘲讽范围
|
|
/// </summary>
|
|
private int _tauntRange;
|
|
|
|
private int _bulletEmitDistance;
|
|
private float _bulletEmitInterval;
|
|
private int _bulletId;
|
|
|
|
public SummonTotem1(DataSummon configData,
|
|
uint id,
|
|
GameUnit creator) : base(configData, id, creator)
|
|
{
|
|
avatarType = EAvatarType.Building;
|
|
|
|
_tauntRange = _ReadIntParam(0);
|
|
_bulletEmitDistance = _ReadIntParam(1);
|
|
_bulletEmitInterval = _ReatFloatParam(2);
|
|
_bulletId = _ReadIntParam(3);
|
|
}
|
|
|
|
protected override void _OnInited()
|
|
{
|
|
base._OnInited();
|
|
|
|
var tauntLogic = new SLogicTaunt(this);
|
|
tauntLogic.tauntRange = _tauntRange;
|
|
_AddLogic(tauntLogic);
|
|
|
|
var emitBulletLogic = new SLogicEmitBulletDistance(this);
|
|
emitBulletLogic.emitDistance = _bulletEmitDistance;
|
|
emitBulletLogic.emitInterval = _bulletEmitInterval;
|
|
emitBulletLogic.bulletId = _bulletId;
|
|
_AddLogic(emitBulletLogic);
|
|
}
|
|
}
|
|
}
|