Exemplo n.º 1
0
        public void Jump()
        {
            if (_disabled)
            {
                return;
            }

            _jumpComponent.Jump();
        }
Exemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     if (isLocalPlayer)
     {
         if (Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode.D))
         {
             WalkComponent.Walk();
         }
         if (Input.GetKey(KeyCode.Space))
         {
             JumpComponent.Jump();
         }
         if (!Input.anyKeyDown && !Input.anyKey)
         {
             IdleComponent.Idle();
         }
         if (Input.GetMouseButtonDown(1))
         {
             WeaponComponents[SelectedWeapon].UseWeaponPrimary();
         }
         if (Input.GetMouseButtonDown(2))
         {
             WeaponComponents[SelectedWeapon].UseWeaponSecondary();
         }
         if (Input.GetKey(KeyCode.V))
         {
             //Quick Meele
         }
         if (Input.GetKey(KeyCode.Q))
         {
             //Ultimate
         }
         if (Input.GetKey(KeyCode.E))
         {
             //PrimaryAbility
         }
         if (Input.GetKey(KeyCode.LeftShift))
         {
             //UtilityAbility
         }
         if (Input.GetKey(KeyCode.R))
         {
             //Reload
         }
     }
 }