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; } }
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); }
private void Awake() { instance = this; SetupAbilitySlots(); }