Пример #1
0
 void Awake()
 {
     if (instance != null)
     {
         Debug.LogWarning("More than 1 instance of AllCards");
         return;
     }
     instance = this;
 }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     spellBar        = Spell_Bar.instance;
     gameManager     = GameManager.instance;
     playerInfo      = Player_Information.instance;
     spellUI         = Spell_Bar_UI.instance;
     enemyList       = GameObject.FindGameObjectsWithTag("Enemy");
     walkableTilemap = gameManager.walkableTilemap;
     wallTilemap     = gameManager.wallTilemap;
 }
Пример #3
0
    public void Add_Player(int _player_index, int _player_number)
    {
        for (int i = 0; i < all_players.Count; i++)
        {
            if (all_players[i].player_index == _player_index || all_players[i].player_number == _player_number)
            {
                return;
            }
        }
        Player_Information new_player = new Player_Information(_player_index, _player_number);

        all_players.Add(new_player);
    }