public Mob SpawnMob(Mob mob, Vector2Int location, Mob.MovementSettings movementSettings = null) { var mobInstance = Instantiate(mob, transform); mobInstance.initializeSelf = false; InitializeMob(mobInstance, location, movementSettings); return(mobInstance); }
public void InitializeMob(Mob mob, Vector2Int location, Mob.MovementSettings movementSettings = null) { if (movementSettings != null) { mob.movementSettings = movementSettings; } InitializeUnit(mob, location); }
public Mob SpawnMob(string mobName, Vector2Int location, Mob.MovementSettings movementSettings = null) { var mob = Resources.Load <Mob>($"{PATH}{mobName}"); return(SpawnMob(mob, location, movementSettings)); }