Exemplo n.º 1
0
 void OnTriggerExit2D(Collider2D other)
 {
     if (other.CompareTag("Player"))
     {
         activateMiddle = false;
     }
     LowerLadder.UpdateIfNeed();
     //Debug.Log("Middle unactive");
 }
Exemplo n.º 2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.CompareTag("Player"))
     {
         activateUpper = true;
     }
     LowerLadder.UpdateIfNeed();
     //Debug.Log("Upper active");
 }
Exemplo n.º 3
0
 void MoveRight()
 {
     if (!LowerLadder.DenyTurn())
     {
         player.GetComponent <Rigidbody2D>().transform.position += Vector3.right * mainSpeed * Time.deltaTime;
         player.GetComponent <SpriteRenderer>().flipX            = true;
         PlayerMove.currentPlayerAction = PlayerMove.PlayerStates.Walking;
     }
 }