Beispiel #1
0
 void Update()
 {
     if (interactObject)
     {
         if (Input.GetButtonDown("Jump") && !interacting)
         {
             if (interactObject.occupied)
             {
                 return;
             }
             interactObject.UsePost(gameObject.transform.parent.gameObject);
             movement.PlayIdle();
             SetView(false);
             rb.velocity = new Vector2(0, 0);
             interacting = true;
         }
         if (Input.GetButtonDown("Cancel") && interacting)
         {
             // foreach (MonoBehaviour c in comps)
             //     c.enabled = true;
             SetView(true);
             interactObject.GetOutPost();
             interacting = false;
         }
     }
 }