Exemplo n.º 1
0
 // Update is called once per frame
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         player = collision.gameObject.GetComponent <VerticalForse>();
         if (!player.IsJumping())
         {
             player.StartJump(JumpForse);
             Sound.Play();
         }
     }
 }
Exemplo n.º 2
0
 // Update is called once per frame
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         player = collision.gameObject.GetComponent <VerticalForse>();
         if (!IsGameStarted)
         {
             UsualJump();
         }
         else
         {
             StartGameJump();
         }
     }
 }