示例#1
0
 private void RegisterOtherInputs()
 {
     if (Input.GetKeyDown(ControlConstants.BaseAttack) ||
         Input.GetMouseButtonDown(0)) // TODO: Remove mouse later on...
     {
         attackController.AddAttackInput(AttackInputEnum.BaseAttack);
         m_attackInputs.Add(AttackInputEnum.BaseAttack);
     }
     else if (Input.GetKeyDown(ControlConstants.Attack_1))
     {
         attackController.AddAttackInput(AttackInputEnum.Attack_1);
         m_attackInputs.Add(AttackInputEnum.Attack_1);
     }
     else if (Input.GetKeyDown(ControlConstants.Attack_2))
     {
         attackController.AddAttackInput(AttackInputEnum.Attack_2);
         m_attackInputs.Add(AttackInputEnum.Attack_2);
     }
     else if (Input.GetKeyDown(ControlConstants.Attack_3))
     {
         attackController.AddAttackInput(AttackInputEnum.Attack_3);
         m_attackInputs.Add(AttackInputEnum.Attack_3);
     }
     else if (Input.GetKeyDown(ControlConstants.Attack_4))
     {
         attackController.AddAttackInput(AttackInputEnum.Attack_4);
         m_attackInputs.Add(AttackInputEnum.Attack_4);
     }
     else if (Input.GetKeyDown(ControlConstants.BlockKey))
     {
         attackController.InitiateAttackBlocking();
     }
     else if (Input.GetKeyUp(ControlConstants.BlockKey))
     {
         attackController.CancelAttackBlocking();
     }
 }