Example #1
0
 private void PauseGameAbility2()
 {
     abilityDescriptionFrame.SetActive(true);
     ability2Description.SetActive(true);
     isPaused = true;
     ArenaEvents.StopCamera();
     Time.timeScale = 0.00001f;
 }
Example #2
0
 private void CheckSecondPhase()
 {
     if (currentHP <= 8 && isSecondPhase == false)
     {
         GetComponent <BossSecondAbility>().unlock = true;
         ArenaEvents.SpawnTaco();
         isSecondPhase = true;
     }
 }
Example #3
0
 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;
 }
Example #4
0
 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);
 }
Example #5
0
    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);
    }
Example #6
0
        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);
        }
Example #7
0
    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();
    }
Example #8
0
        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"
            });
        }
Example #9
0
 private void SpawnBoss()
 {
     ArenaEvents.BossArrive();
 }
Example #10
0
 private void SpawnHealPack()
 {
     ArenaEvents.SpawnTaco();
 }