コード例 #1
0
 void playerInput()
 {
     if (isStun)
     {
         return;
     }
     if (Input.GetKey(KeyCode.A))
     {
         moveLeft();
     }
     if (Input.GetKey(KeyCode.D))
     {
         moveRight();
     }
     if (!Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.D) && rotateArm.isEnabled())
     {
         rotateArm.stopRotate();
     }
     if (Input.GetKeyDown(KeyCode.Space))
     {
         swichMoveMent();
     }
     if (Input.GetKeyDown(KeyCode.W) && slimeArm.isEnabled())
     {
         slimeArm.activate();
     }
     if (!Input.GetKey(KeyCode.W) && slimeArm.isEnabled())
     {
         slimeArm.deactivate();
     }
     if (Input.GetKey(KeyCode.J) && grapple.isEnabled() && rotateArm.isActivate())
     {
         shootHook();
     }
 }
コード例 #2
0
 void playerInput()
 {
     //////if (Input.GetKey(KeyCode.S))
     //////{ rotateArm.rotateLeft();
     //////    Debug.Log("l");
     //////}
     //////if (Input.GetKey(KeyCode.W))
     //////{
     //////    rotateArm.rotateRight();
     //////    Debug.Log("r");
     //////}
     if (!Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.D) && rotateArm.isEnabled())
     {
         rotateArm.stopRotate();
     }
     if (Input.GetKeyDown(KeyCode.Space))
     {
         swichMoveMent();
     }
     //if (Input.GetKeyDown(KeyCode.W)&&slimeArm.isEnabled())
     //    slimeArm.activate();
     //if (!Input.GetKey(KeyCode.W)&&slimeArm.isEnabled())
     //    slimeArm.deactivate();
     if (Input.GetKey(KeyCode.K) && grapple.isEnabled() && rotateArm.isActivate())
     {
         shootHook();
     }
     if (Input.GetKeyDown(KeyCode.J) && landHit.isEnabled() && rotateArm.isActivate())
     {
         attack();
     }
     if (Input.GetKeyDown(KeyCode.J) && basicMoveMent.isActivate())
     {
         Debug.Log("jp");
         basicMoveMent.Jump();
     }
 }
コード例 #3
0
 void attackFail()
 {
     rotateArm.stopRotate();
 }