Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     ply1attach.AddForceInDirection();
     ply2attach.AddForceInDirection();
     CheckKeyDown();
     if (Input.GetButtonDown(xBtn1))
     {
         ply1attach.AttachTo();
     }
     if (Input.GetButtonUp(xBtn1))
     {
         ply1attach.DetatchFrom();
     }
     if (Input.GetButton(rbBtn1))
     {
         ply1attach.MoveIn();
     }
     if (Input.GetButton(lbBtn1))
     {
         ply1attach.MoveOut();
     }
     if (Input.GetButtonDown(xBtn2))
     {
         ply2attach.AttachTo();
     }
     if (Input.GetButtonUp(xBtn2))
     {
         ply2attach.DetatchFrom();
     }
     if (Input.GetButton(rbBtn2))
     {
         ply2attach.MoveIn();
     }
     if (Input.GetButton(lbBtn2))
     {
         ply2attach.MoveOut();
     }
     if (Input.GetButton(aBtn1))
     {
         ply1attach.Jump();
     }
     if (Input.GetButton(aBtn2))
     {
         ply2attach.Jump();
     }
 }