Ejemplo n.º 1
0
    IEnumerator LoadConfig(Action callback)
    {
        enemy = Resources.Load("DataTable/ConfigEnemy", typeof(ScriptableObject)) as ConfigEnemy;
        yield return(new WaitUntil(() => enemy != null));

        mission = Resources.Load("DataTable/ConfigMission", typeof(ScriptableObject)) as ConfigMission;
        yield return(new WaitUntil(() => mission != null));

        wave = Resources.Load("DataTable/ConfigWave", typeof(ScriptableObject)) as ConfigWave;
        yield return(new WaitUntil(() => wave != null));

        gun = Resources.Load("DataTable/ConfigGun", typeof(ScriptableObject)) as ConfigGun;
        yield return(new WaitUntil(() => gun != null));

        gunDmg = Resources.Load("DataTable/ConfigGunDamage", typeof(ScriptableObject)) as ConfigGunDamage;
        yield return(new WaitUntil(() => gunDmg != null));

        gunRof = Resources.Load("DataTable/ConfigGunRof", typeof(ScriptableObject)) as ConfigGunRof;
        yield return(new WaitUntil(() => gunRof != null));

        playerDamage = Resources.Load("DataTable/ConfigPlayerDamage", typeof(ScriptableObject)) as ConfigPlayerDamage;
        yield return(new WaitUntil(() => playerDamage != null));

        playerFireRate = Resources.Load("DataTable/ConfigPlayerFireRate", typeof(ScriptableObject)) as ConfigPlayerFireRate;
        yield return(new WaitUntil(() => playerFireRate != null));

        tip = Resources.Load("DataTable/ConfigTip", typeof(ScriptableObject)) as ConfigTip;
        yield return(new WaitUntil(() => tip != null));

        playerCoinValue = Resources.Load("DataTable/ConfigPlayerCoinValue", typeof(ScriptableObject)) as ConfigPlayerCoinValue;
        yield return(new WaitUntil(() => playerCoinValue != null));

        playerDailyCoin = Resources.Load("DataTable/ConfigPlayerDailyCoin", typeof(ScriptableObject)) as ConfigPlayerDailyCoin;
        yield return(new WaitUntil(() => playerDailyCoin != null));

        buffDebuff = Resources.Load("DataTable/ConfigBuffDebuff", typeof(ScriptableObject)) as ConfigBuffDebuff;
        yield return(new WaitUntil(() => buffDebuff != null));

        pBuff = Resources.Load("DataTable/ConfigProjectileBuff", typeof(ScriptableObject)) as ConfigProjectileBuff;
        yield return(new WaitUntil(() => pBuff != null));



        callback?.Invoke();
    }
Ejemplo n.º 2
0
 public void SetConfigVague(ConfigWave vagueEncours)
 {
     this._configVague = vagueEncours;
 }