コード例 #1
0
    private void Awake()
    {
        if (Instance != null)
        {
            throw new System.Exception();
        }
        Instance = this;

        this.dungeonManager = DungeonManager.Instance;
        foreach (BattleCharacter ally in this.dungeonManager.Allys)
        {
            this.charaList.Add(ally);
            this.allyList.Add(ally);
        }
        foreach (BattleCharacter enemy in this.dungeonManager.Enemys)
        {
            this.charaList.Add(enemy);
            this.enemyList.Add(enemy);
        }
        this.haveActiveItems  = this.dungeonManager.HaveBattleActiveItems;
        this.havePassiveItems = this.dungeonManager.HaveBattlePassiveItems;
        foreach (BattleCharacter bc in this.charaList)
        {
            bc.Start();
        }
    }
コード例 #2
0
    private bool SetCharacter()
    {
        DungeonBattleManager dbm = DungeonBattleManager.Instance;

        try
        {
            if (isEnemy)
            {
                this.bc = dbm.Enemys[this.index];
            }
            else
            {
                this.bc = dbm.Allys[this.index];
            }
        }catch (Exception)
        {
            Destroy(this.gameObject);
            return(false);
        }
        return(true);
    }