Пример #1
0
    void OnTriggerEnter2D(Collider2D collider)
    {
        if (collider.gameObject.CompareTag("Player"))
        {
            PlayerController player = collider.gameObject.GetComponent <PlayerController>();

            PlayerAtomic(player);

            audioPlayer.Play();
            particles.Play();

            toRemove = true;
        }

        if (collider.gameObject.CompareTag("PlayerSnow"))
        {
            PlayeContorollerSnow playerSnow = collider.gameObject.GetComponent <PlayeContorollerSnow>();

            PlayerSnowAtomic(playerSnow);

            audioPlayer.Play();
            particles.Play();

            toRemove = true;
        }

        if (collider.gameObject.CompareTag("PlayerLava"))
        {
            PlayerControllerLava playerLava = collider.gameObject.GetComponent <PlayerControllerLava>();

            PlayerLavaAtomic(playerLava);

            audioPlayer.Play();
            particles.Play();

            toRemove = true;
        }


        if (collider.gameObject.CompareTag("PlayerBoss"))
        {
            PlayerControllerBoss playerBoss     = collider.gameObject.GetComponent <PlayerControllerBoss>();
            BossController       playerRealBoss = collider.gameObject.GetComponent <BossController>();

            PlayerBossAtomic(playerBoss);
            BossAtomic(playerRealBoss);

            audioPlayer.Play();
            particles.Play();

            toRemove = true;
        }
    }
Пример #2
0
    void ResetPlayers()
    {
        PlayeContorollerSnow player1Controller = player1.GetComponentInChildren <PlayeContorollerSnow>();

        player1Controller.ResetPosition();
        PlayerHealth player1Health = player1.GetComponentInChildren <PlayerHealth>();

        player1Health.ResetHealth();

        PlayeContorollerSnow player2Controller = player2.GetComponentInChildren <PlayeContorollerSnow>();

        player2Controller.ResetPosition();
        PlayerHealth player2Health = player2.GetComponentInChildren <PlayerHealth>();

        player2Health.ResetHealth();
    }
Пример #3
0
 private void PlayerSnowAtomic(PlayeContorollerSnow playerSnow)
 {
     playerSnow.SetNextBullet(atomicBullet);
 }
Пример #4
0
 private void PlayerSnowHeart(PlayeContorollerSnow playerSnow)
 {
     playerSnow.Heal(lifeGiving);
     playerSnow.TakeDamage(-0);
 }