Example #1
0
 // Use this for initialization
 void Start()
 {
     if (!(_cardsOnField = this.GetComponent <OnFieldCards>()))
     {
         _cardsOnField = this.gameObject.AddComponent <OnFieldCards>();
     }
     if (!(_enemyHand = this.GetComponent <Enemy_Hand>()))
     {
         _enemyHand = this.gameObject.AddComponent <Enemy_Hand>();
     }
     if (!(_enemyMana = this.GetComponent <Enemy_Mana>()))
     {
         _enemyMana = this.gameObject.AddComponent <Enemy_Mana>();
     }
     if (!(_turnManager = this.GetComponent <Turn_Manager>()))
     {
         _turnManager = this.gameObject.AddComponent <Turn_Manager>();
     }
     //_EnemyCards = GameObject.FindGameObjectsWithTag("EnemyCard");
     //minion = _cardsOnField.onPlayerField.Find(minion => minion.tag == "Taunt");
 }
Example #2
0
    // Use this for initialization
    void Start()
    {
        Debug.Log("Test");

        turns = true;

        if (!(inputManager = this.GetComponent <Input_Managing>()))
        {
            inputManager = this.gameObject.AddComponent <Input_Managing>();
        }
        if (!(_enemyMana = this.GetComponent <Enemy_Mana>()))
        {
            _enemyMana = this.gameObject.AddComponent <Enemy_Mana>();
        }
        if (!(_enemyHand = this.GetComponent <Enemy_Hand>()))
        {
            _enemyHand = this.gameObject.AddComponent <Enemy_Hand>();
        }
        if (!(_enemyDeck = this.GetComponent <Enemy_Deck>()))
        {
            _enemyDeck = this.gameObject.AddComponent <Enemy_Deck>();
        }
    }