private void PauseGameAbility2() { abilityDescriptionFrame.SetActive(true); ability2Description.SetActive(true); isPaused = true; ArenaEvents.StopCamera(); Time.timeScale = 0.00001f; }
private void CheckSecondPhase() { if (currentHP <= 8 && isSecondPhase == false) { GetComponent <BossSecondAbility>().unlock = true; ArenaEvents.SpawnTaco(); isSecondPhase = true; } }
private void StartCharge() { Time.timeScale = 1f; rb.velocity = Vector3Extension.CalculateDirectionTowardsMouse(transform.position) * chargeSpeed; StartCoroutine("ChargeDuration", abilityDuration); anim.SetBool("Charge", true); isCharging = true; ArenaEvents.PlayerCharge(); hasCharged = false; }
private void Death() { healthBar.transform.parent.gameObject.SetActive(false); GetComponent <BossMeleeAttack>().enabled = false; GetComponent <BossMovement>().enabled = false; GetComponent <BossFirstAbility>().enabled = false; GetComponent <BossSecondAbility>().enabled = false; ArenaEvents.PlayerVictory(); PlayerPrefs.SetString("Boss", "Yes"); enabled = false; this.gameObject.SetActive(false); }
IEnumerator ChargeDuration(float time) { yield return(new WaitForSeconds(time)); GetComponent <PlayerHP>().canBeHurt = true; anim.SetBool("Charge", false); isCharging = false; ArenaEvents.PlayerCharge(); rb.velocity = Vector2.zero; GetComponent <ArenaMovement>().enabled = true; GetComponent <PlayerAttack>().enabled = true; GetComponent <DivingElbowAbility>().enabled = true; StartCoroutine("AbilityCooldown", abilityCooldown); }
private void button1_Click(object sender, EventArgs e) { textBox1.Clear(); var playerOne = SelectedHero(comboBox1.Text, textBox2.Text); var playerTwo = SelectedHero(comboBox2.Text, textBox3.Text); var match = new ArenaEvents(); match.Starting += OnStarting; match.RoundStarting += OnRoundStarting; match.Playing += OnPlaying; match.RoundEnding += OnRoundEnding; match.Ending += OnEnding; match.Fight(playerOne, playerTwo); }
private void Death() { isAlive = false; var animator = GetComponent <Animator>(); animator.SetTrigger("Death"); animator.SetBool("Idle", false); animator.SetBool("Run", false); GetComponent <Rigidbody2D>().constraints = RigidbodyConstraints2D.FreezePositionX | RigidbodyConstraints2D.FreezePositionY | RigidbodyConstraints2D.FreezeRotation; GetComponent <PlayerAttack>().enabled = false; GetComponent <ArenaMovement>().enabled = false; GetComponent <TableChargeAbility>().enabled = false; GetComponent <DivingElbowAbility>().enabled = false; GetComponent <ISoundEffect>().PlayDeathSound(); this.enabled = false; ArenaEvents.PlayerDeath(); }
static void Main(string[] args) { var match = new ArenaEvents(); var start = new PrintFight(); match.Starting += start.OnStarting; match.RoundStarting += start.OnRoundStarting; match.Playing += start.OnPlaying; match.RoundEnding += start.OnRoundEnding; match.Ending += start.OnEnding; match.Fight(new Warrior() { Name = "Natasha" }, new Knight() { Name = "Victoria" }); }
private void SpawnBoss() { ArenaEvents.BossArrive(); }
private void SpawnHealPack() { ArenaEvents.SpawnTaco(); }