Exemple #1
0
 public void GetHit()
 {
     Shards.ExplodeAt(t.position, Color.white, 10, 20);
     Shards.ExplodeAt(t.position, Color.red, 10, 20);
     Shards.ExplodeAt(t.position, new Color(0.231f, 0.38f, 0.235f), 80, 10);
     Shards.ExplodeAt(t.position, new Color(0.988f, 0.933f, 0.914f), 50, 8);
     Shards.ExplodeAt(t.position, new Color(0.831f, 0.831f, 0.831f), 30, 7);
     t.position         = new Vector3(0f, 11f);
     rigidBody.velocity = Vector2.zero;
     anim.SetTrigger("Freefall");
     EverythingMoves.MoveSpeed = GameData.DefaultSpeed;
     Ghost.EagleCombo          = 0;
     Ghost.OtterCombo          = 0;
     OtterC.StopCombo();
     EagleC.StopCombo();
     AudioManager.PlaySFX(SFX.Die);
     CameraFixer.Screenshake();
     GameData.PlayerDied = true;
     hits++;
     if (hits == 2)
     {
         Pause.Die();
         gameObject.SetActive(false);
     }
 }
 private void Awake()
 {
     f      = this;
     camera = GetComponent <Camera>();
 }