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

25 lines
628 B
C#
Raw Normal View History

using Gameplay.Unit;
2023-08-22 19:08:45 +08:00
namespace Gameplay.Summon
{
public class SummonManager
{
2023-12-13 14:11:09 +08:00
public BaseSummon CreateSummon(int summonId, int createCellIndex, GameUnit creator)
2023-08-22 19:08:45 +08:00
{
var createSummon = GameUnitManager.instance.PrepareSummon(summonId, creator) as BaseSummon;
2023-08-22 19:08:45 +08:00
if (createSummon == null)
{
return null;
}
GameUnitManager.instance.MoveUnitToFight(createSummon.GetID(), createCellIndex, 0);
2023-08-22 19:08:45 +08:00
createSummon.Create();
createSummon.Init(createCellIndex, 0);
2023-08-22 19:08:45 +08:00
return createSummon;
}
}
}