Пример #1
0
 void Awake()
 {
     if (combatUI == null)
     {
         DontDestroyOnLoad(gameObject);
         combatUI = this;
     }
     else if (combatUI != this)
     {
         Destroy(gameObject);
     }
 }
 void Awake()
 {
     if (Instance != null && Instance != this)
     {
         Destroy(this.gameObject);
         return;
     }
     else
     {
         Instance = this;
     }
 }
Пример #3
0
    public void StartCombat()
    {
        _combatUIController = CombatUIGroup.GetComponent <CombatUIController>();
        _enemy = new Enemy("Test Dummy", 30, "testDummy");
        _combatUIController.DisplayEnemyInformation(_enemy);

        _deckList    = Managers.Deck.GetDeckCardList();
        _handList    = new List <Card>();
        _discardList = new List <Card>();

        while (_handList.Count < _startingHandSize)
        {
            DrawCard();
        }

        Debug.Log("combatDeck is:");
        foreach (Card deckCard in _deckList)
        {
            Debug.Log(deckCard.Name);
        }

        Debug.Log("hand is: ");
        foreach (Card handCard in _handList)
        {
            Debug.Log(handCard.Name);
        }

        _combatUIController.DisplayCombatText("You encounter a " + _enemy.Name + "!");
        CombatUIGroup.SetActive(true);

        combatActive     = true;
        enemyAttackTimer = 0;

        _comboCounter = 0;
        _previousCard = _comboResetCard;
        _combatUIController.UpdateComboDisplay(_comboCounter);
    }
Пример #4
0
    private void Awake()
    {
        instance = this;

        SetupAbilitySlots();
    }