コード例 #1
0
 void Update()
 {
     playerMovement.Move(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"));
     if(Input.GetKeyDown(shootButton))
     {
         gunHandler.Shoot();
     }
     if (Input.GetKeyDown(switchWeaponButton) && gunHandler.secondaryGun != null)
     {
         gunHandler.SwitchWeapon();
     }
     if(Input.GetKeyDown(jumpButton))
     {
         playerMovement.Jump();
     }
     if(Input.GetKeyDown(rayButton))
     {
         gunHandler.ActivateRay();
     }
     if(Input.GetKeyUp(rayButton))
     {
         gunHandler.DeactivateRay();
     }
     PickUpCheck();
 }