protected override void EndAbility() { Debug.Log($"Fireball Damage total: {CurrentDamage}"); // Deal damage to defender, wait GameObject victim = TargetedCombatants[Random.Range(0, TargetedCombatants.Length)]; FireballGrowSound.Stop(); StartCoroutine(LaunchFireball(victim)); Animator.SetBool("IsFinishedCasting", true); CurrentPhase = FireballPhase.Inactive; }
private void StartFireballPhase() { this.CurrentPhase = FireballPhase.Growth; Fireball.SetActive(true); Fireball.transform.position = transform.position + FireballHeight * Vector3.up; Fireball.transform.localScale = Vector3.one * FireballScale; MainModule.startColor = Color.red; LightSource.color = Color.red; LightSource.intensity = 15.0f; ExpectedDirections = new List <ExpectedDirection> { ExpectedDirection.Up, ExpectedDirection.Right, ExpectedDirection.Down, ExpectedDirection.Left }; CurrentCyclePhase = FireballCyclePhase.Normal; Timer.StartTimer(Random.Range(FireballGrowthMinDuration, FireballGrowthMaxDuration)); }