public void EnemyPopUp(Fears fear) { OnEnemyEvent(); int n = 0; switch (fear) { case Fears.DRAGON: n = 0; break; case Fears.GHOST: n = 1; break; case Fears.TROLL: n = 2; break; } for (int i = 0; i < enemies.Length; i++) { if (i == n) { enemies[i].SetActive(true); } else { enemies[i].SetActive(false); } } enemies[n].transform.parent.gameObject.SetActive(true); StartCoroutine(DissapearEnemyPopUp(n)); }
private void ActivateEnemyPopup() { try { Fears fears = (Fears)UnityEngine.Random.Range(0, 3); UIManager.Instance.EnemyPopUp(fears); OnReceiveFear(fears); allowEnemy = 0f; } catch (NullReferenceException e) { } }
public void ReducePatienceBecauseOfFear(Fears fear) { if (fear == this.fear) { StartCoroutine(PatienceIndicator(Color.red)); AudioManager.Instance.CharacterScream(); patience -= 10; patienceSlider.value = patience; } }
public void ExecuteStep(CharacterSheet character) { var strategy = character.Strategy; var selected = fearGateway.Choose(strategy.FearCount); var fears = new Fears(); foreach (var q in selected) { fears.Add(CharacterSentenceGenerator.Create(character, q)); } character.Add(fears); }