Example #1
0
    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);
    }
Example #2
0
    public void InitializeMob(Mob mob, Vector2Int location, Mob.MovementSettings movementSettings = null)
    {
        if (movementSettings != null)
        {
            mob.movementSettings = movementSettings;
        }

        InitializeUnit(mob, location);
    }
Example #3
0
    public Mob SpawnMob(string mobName, Vector2Int location, Mob.MovementSettings movementSettings = null)
    {
        var mob = Resources.Load <Mob>($"{PATH}{mobName}");

        return(SpawnMob(mob, location, movementSettings));
    }