25 lines
628 B
C#
25 lines
628 B
C#
using Gameplay.Unit;
|
|
|
|
namespace Gameplay.Summon
|
|
{
|
|
public class SummonManager
|
|
{
|
|
|
|
public BaseSummon CreateSummon(int summonId, int createCellIndex, GameUnit creator)
|
|
{
|
|
var createSummon = GameUnitManager.instance.PrepareSummon(summonId, creator) as BaseSummon;
|
|
if (createSummon == null)
|
|
{
|
|
return null;
|
|
}
|
|
GameUnitManager.instance.MoveUnitToFight(createSummon.GetID(), createCellIndex, 0);
|
|
|
|
createSummon.Create();
|
|
createSummon.Init(createCellIndex, 0);
|
|
|
|
return createSummon;
|
|
}
|
|
|
|
}
|
|
}
|