예제 #1
0
 public void Update()
 {
     if (!PlayerInControl)
     {
         throw new Exception("A player is required to be controled.");
     }
     for (var i = 0; i < SkillKeys.Count; i++)
     {
         if (InputManager.Instance.GetKeyDown(SkillKeys[i]))
         {
             SkillController.ActivateSkill(i);
         }
     }
     if (InputManager.Instance.GetKeyDown(InteractKey))
     {
         SkillController.ActivateSkill <InteractSkill>();
     }
     if (InputManager.Instance.GetKeyDown(WeaponSwitchKey))
     {
         PlayerInControl.GetComponent <Equipments>().Switch();
     }
     EntityController.Move(MovementInput.GetMovement());
     EntityController.FaceTo(InputManager.Instance.MouseOnGround() - PlayerInControl.transform.position);
     //SkillController.ActivateMovementSkill(MovementInput.GetMovement());
 }