Example #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();
         }
     }
 }
Example #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();
         }
     }
 }