42 lines
990 B
C#
42 lines
990 B
C#
using System.Collections.Generic;
|
|
using cfg.SummonCfg;
|
|
using Gameplay.Common;
|
|
using Gameplay.Unit;
|
|
using UnityEngine;
|
|
namespace Gameplay.Summon
|
|
{
|
|
public class SummonBulletBox : BaseSummon
|
|
{
|
|
|
|
public List<int> buffIds;
|
|
|
|
public SummonBulletBox(DataSummon configData, uint id, GameUnit creator) : base(configData, id, creator)
|
|
{
|
|
avatarType = EAvatarType.Building;
|
|
}
|
|
|
|
protected override void _OnInited()
|
|
{
|
|
base._OnInited();
|
|
|
|
buffIds = new List<int>();
|
|
|
|
// 所有的id都是buffId
|
|
for (int i = 0; i < configData.FloatParams.Count; i++)
|
|
{
|
|
buffIds.Add(Mathf.RoundToInt(configData.FloatParams[i]));
|
|
}
|
|
}
|
|
|
|
protected override void _OnInitFsm()
|
|
{
|
|
base._OnInitFsm();
|
|
|
|
_fsm.Add(new BulletBoxStateIdle(this));
|
|
|
|
_fsm.ChangeState(ESummonState.Idle);
|
|
}
|
|
|
|
}
|
|
}
|