public Character CreatCharacter(Type characterType, Type weaponType, Vector3 spawnPos, int lv = 1)
    {
        EnemyBuilder builder = new EnemyBuilder(characterType, weaponType, spawnPos, lv);
        Character    enemy   = CharacterDirector.Construct(builder);

        GameFacade.Instance.CharacterSystem.AddEnemy(enemy as Enemy);
        return(enemy);
    }
Example #2
0
    public Character CreatCharacter(Type characterType, Type weaponType, Vector3 spawnPos, int lv = 1)
    {
        SoldierBuilder builder = new SoldierBuilder(characterType, weaponType, spawnPos, lv);
        Character      soldier = CharacterDirector.Construct(builder);

        GameFacade.Instance.CharacterSystem.AddSoldier(soldier as Soldier);//添加到角色系统

        return(soldier);
    }