//---------------------- // Protected Functions //---------------------- // Private Functions /// <summary> /// Process/Handle the inputs from the user. /// </summary> private void ProcessInput() { if (JCS_Input.GetMouseByAction(mShootAction.KeyAct, mShootAction.MouseButton) || JCS_Input.GetKeyByAction(mShootAction.KeyAct, mShootAction.ShootKeyCode)) { // check we are able to shoot. // like enough mana to cast? or something like this. if (mShootAction.GetCheckAbleToShootFunction().Invoke()) { // do callback mShootAction.GetShootCallback().Invoke(); ShootsInSequence(); } } }
/// <summary> /// Process/Handle the inputs from the user. /// </summary> private void ProcessInput() { if (JCS_Input.GetMouseByAction(mShootAction.KeyAct, mShootAction.MouseButton) || JCS_Input.GetKeyByAction(mShootAction.KeyAct, mShootAction.ShootKeyCode)) { if (mShootAction.GetCheckAbleToShootFunction().Invoke()) { // do call back mShootAction.GetShootCallback().Invoke(); // shoot a bullet. for (int count = 0; count < mShootAction.ShootCount; ++count) { mShootAction.Shoot(); } } } }