private bool onActionEvent(InputEvents.ActionEvent evt)
    {
        if (currentState == DanceBattleQuestGameState.InputtingMoves)
        {
            switch (evt.Action)
            {
            case InputEvents.Actions.Action1:
                moveIconList[inputMovesList.Count].SetState(DanceBattleMoveIcon.MoveIconState.Icon1);
                inputMovesList.Add(1);
                break;

            case InputEvents.Actions.Action2:
                moveIconList[inputMovesList.Count].SetState(DanceBattleMoveIcon.MoveIconState.Icon2);
                inputMovesList.Add(2);
                break;

            case InputEvents.Actions.Action3:
                moveIconList[inputMovesList.Count].SetState(DanceBattleMoveIcon.MoveIconState.Icon3);
                inputMovesList.Add(3);
                break;
            }
            if (inputMovesList.Count < movesList.Count)
            {
                EventManager.Instance.PostEvent("SFX/UI/DanceGame/Note1", EventAction.PlaySound, null, null);
            }
            else
            {
                EventManager.Instance.PostEvent("SFX/UI/DanceGame/Note2", EventAction.PlaySound, null, null);
            }
        }
        return(false);
    }
Exemple #2
0
 private bool onActionEvent(InputEvents.ActionEvent evt)
 {
     if (actionsSet.Contains(evt.Action))
     {
         taskIncrement();
     }
     return(false);
 }
 private bool onInputEventActionEvent(InputEvents.ActionEvent evt)
 {
     if (evt.Action == InputEvents.Actions.Cancel)
     {
         base.Fsm.Event(LocalPlayerCancelEvent);
     }
     return(false);
 }
 private bool filterUsePropOnActionEvent(InputEvents.ActionEvent evt)
 {
     Service.Get <ActionConfirmationService>().ConfirmAction(typeof(UserPropOnActionEventFilterTag), evt, delegate
     {
         usePropOnActionEvent(evt);
     });
     return(false);
 }
Exemple #5
0
 private bool onInputEventActionEvent(InputEvents.ActionEvent evt)
 {
     switch (evt.Action)
     {
     default:
         return(false);
     }
 }
Exemple #6
0
 private bool onActionEvent(InputEvents.ActionEvent evt)
 {
     if (evt.Action == InputEvents.Actions.Jump && !isTubing(playerObject))
     {
         onJumpInput();
     }
     return(false);
 }
Exemple #7
0
 private bool onAction(InputEvents.ActionEvent evt)
 {
     if (evt.Action == InputEvents.Actions.Cancel)
     {
         base.Fsm.Event(CancelEvent);
     }
     return(false);
 }
Exemple #8
0
 private bool OnAction(InputEvents.ActionEvent evt)
 {
     InputEvents.Actions action = evt.Action;
     if (action == InputEvents.Actions.Action1 && !swimController.TriggerQuickResurface)
     {
         swimController.TriggerQuickResurface = true;
         showResurfacePrompt();
     }
     return(false);
 }
 private bool onActionEvent(InputEvents.ActionEvent evt)
 {
     if (isInvitationLocalPlayer && evt.Action == InputEvents.Actions.Cancel)
     {
         removeItem();
         if (propExperience.PropDef != null)
         {
             Service.Get <ICPSwrveService>().Timing(Mathf.RoundToInt(Time.timeSinceLevelLoad), "consumable_store", propExperience.PropDef.name);
         }
     }
     return(false);
 }
Exemple #10
0
        private bool usePropOnActionEvent(InputEvents.ActionEvent evt)
        {
            if (evt.Action != InputEvents.Actions.Interact || !IsLocalUserUsingProp() || CanActionsBeUsedWithProp())
            {
                return(false);
            }
            if (!userIdToPropUser.TryGetValue(dataEntityCollection.LocalPlayerSessionId, out var value))
            {
                return(false);
            }
            string propId = value.Prop.PropId;

            if (!Props.ContainsKey(propId))
            {
                return(false);
            }
            PropDefinition propDefinition  = Props[propId];
            PropUser       propUser        = userIdToPropUser[dataEntityCollection.LocalPlayerSessionId];
            Vector3        propDestination = getPropDestination(propUser);

            if (propDefinition.ServerAddedItem)
            {
                onPropUsed(dataEntityCollection.LocalPlayerSessionId, propId, dataEntityCollection.LocalPlayerSessionId.ToString(), propDestination);
                GameObject playerObject = getPlayerObject(dataEntityCollection.LocalPlayerSessionId);
                LocomotionEventBroadcaster component = playerObject.GetComponent <LocomotionEventBroadcaster>();
                if (component != null)
                {
                    component.BroadcastOnInteractionStarted(playerObject);
                }
            }
            else if (propDefinition.ExperienceType == PropDefinition.ConsumableExperience.OneShot)
            {
                onPropUsed(dataEntityCollection.LocalPlayerSessionId, propId, dataEntityCollection.LocalPlayerSessionId.ToString(), propDestination);
            }
            if (propDefinition.PropType == PropDefinition.PropTypes.Consumable && !propDefinition.ServerAddedItem)
            {
                if (propDefinition.QuestOnly && !Service.Get <QuestService>().OnPrototypeQuest)
                {
                    Service.Get <INetworkServicesManager>().ConsumableService.ReuseConsumable(value.Prop.PropId, propDestination);
                }
                else if (value.Prop != null && !value.Prop.IsUseCompleted)
                {
                    dataEntityCollection.GetComponent <ConsumableInventoryData>(dataEntityCollection.LocalPlayerHandle).UseConsumable(value.Prop.PropId);
                    Service.Get <INetworkServicesManager>().ConsumableService.UseConsumable(value.Prop.PropId, propDestination);
                    value.Prop.IsUseCompleted = true;
                }
            }
            if (propDefinition.PropType != 0 || propDefinition.ExperienceType == PropDefinition.ConsumableExperience.OneShot)
            {
                dataEntityCollection.GetComponent <HeldObjectsData>(dataEntityCollection.LocalPlayerHandle).HeldObject = null;
            }
            return(false);
        }
        private bool onActionEvent(InputEvents.ActionEvent evt)
        {
            switch (evt.Action)
            {
            case InputEvents.Actions.Action1:
                hookAndReel();
                break;

            case InputEvents.Actions.Cancel:
                finishMinigame();
                questService.SendEvent("FishingGameFailed");
                break;
            }
            return(false);
        }
 private bool onActionEvent(InputEvents.ActionEvent evt)
 {
     if (getCurrentPropName() == propDefinition.GetNameOnServer())
     {
         if (evt.Action == InputEvents.Actions.Cancel)
         {
             base.Fsm.Event(CancelEvent);
         }
         else if ((anyAction && (evt.Action == InputEvents.Actions.Action1 || evt.Action == InputEvents.Actions.Action2 || evt.Action == InputEvents.Actions.Action3)) || (!anyAction && action == evt.Action))
         {
             base.Fsm.Event(UseEvent);
         }
     }
     return(false);
 }
Exemple #13
0
        private bool onActionEvent(InputEvents.ActionEvent evt)
        {
            switch (evt.Action)
            {
            case InputEvents.Actions.Action1:
                sendTurnOutput(1);
                break;

            case InputEvents.Actions.Action2:
                sendTurnOutput(2);
                break;

            case InputEvents.Actions.Action3:
                sendTurnOutput(3);
                break;
            }
            return(false);
        }
Exemple #14
0
        private bool onActionEvent(InputEvents.ActionEvent evt)
        {
            switch (evt.Action)
            {
            case InputEvents.Actions.Action1:
                sendTurnOutput(board.CurrentTokenColumn);
                break;

            case InputEvents.Actions.Action2:
                board.MoveToken(FindFourMoveDirection.LEFT);
                break;

            case InputEvents.Actions.Action3:
                board.MoveToken(FindFourMoveDirection.RIGHT);
                break;
            }
            return(false);
        }
 private bool onAction(InputEvents.ActionEvent evt)
 {
     if (inputButton == null)
     {
         inputButton = GetComponentInParent <InputButton>();
     }
     GetTrayInputButton();
     if (inputButton != null && trayInputButton != null)
     {
         if (inputButton.Action == evt.Action)
         {
             trayInputButton.SetState(TrayInputButton.ButtonState.Highlighted);
         }
         else if (isButtonHighlighted())
         {
             trayInputButton.SetState(TrayInputButton.ButtonState.Default);
         }
     }
     return(false);
 }
Exemple #16
0
 private bool onActionEvent(InputEvents.ActionEvent evt)
 {
     if (prop.IsOwnerLocalPlayer && base.enabled && evt.Action == InputEvents.Actions.Cancel)
     {
         if (ShowConfirmationPopup)
         {
             DPrompt data = new DPrompt(i18nConfirmationTitleText, i18nConfirmationBodyText, DPrompt.ButtonFlags.CANCEL | DPrompt.ButtonFlags.OK, ImageOverride);
             Service.Get <PromptManager>().ShowPrompt(data, onConfirmationPromptButtonsClicked);
         }
         else
         {
             Service.Get <ActionConfirmationService>().ConfirmAction(typeof(PropCancel), null, delegate
             {
                 UnequipProp();
             });
         }
         if (RestoreTouchPadControlsOnCancel)
         {
             Service.Get <EventDispatcher>().DispatchEvent(new UIDisablerEvents.EnableUIElement("Joystick"));
         }
     }
     return(false);
 }
        private bool OnAction(InputEvents.ActionEvent evt)
        {
            LocomotionController currentController = tracker.GetCurrentController();

            if (currentController != null)
            {
                switch (evt.Action)
                {
                case InputEvents.Actions.Jump:
                    if (SceneRefs.ActionSequencer != null)
                    {
                        SceneRefs.ActionSequencer.UserInputReceived();
                    }
                    currentController.DoAction(LocomotionController.LocomotionAction.Jump);
                    break;

                case InputEvents.Actions.Torpedo:
                    if (SceneRefs.ActionSequencer != null)
                    {
                        SceneRefs.ActionSequencer.UserInputReceived();
                    }
                    currentController.DoAction(LocomotionController.LocomotionAction.Torpedo);
                    break;

                case InputEvents.Actions.Interact:
                    if (!Service.Get <PropService>().IsLocalUserUsingProp() || Service.Get <PropService>().CanActionsBeUsedWithProp())
                    {
                        if (SceneRefs.ActionSequencer != null)
                        {
                            SceneRefs.ActionSequencer.UserInputReceived();
                        }
                        currentController.DoAction(LocomotionController.LocomotionAction.Interact);
                    }
                    break;

                case InputEvents.Actions.Action1:
                    if (SceneRefs.ActionSequencer != null)
                    {
                        SceneRefs.ActionSequencer.UserInputReceived();
                    }
                    currentController.DoAction(LocomotionController.LocomotionAction.Action1);
                    break;

                case InputEvents.Actions.Action2:
                    if (SceneRefs.ActionSequencer != null)
                    {
                        SceneRefs.ActionSequencer.UserInputReceived();
                    }
                    currentController.DoAction(LocomotionController.LocomotionAction.Action2);
                    break;

                case InputEvents.Actions.Action3:
                    if (SceneRefs.ActionSequencer != null)
                    {
                        SceneRefs.ActionSequencer.UserInputReceived();
                    }
                    currentController.DoAction(LocomotionController.LocomotionAction.Action3);
                    break;
                }
            }
            return(false);
        }
Exemple #18
0
        private bool OnAction(InputEvents.ActionEvent evt)
        {
            switch (evt.Action)
            {
            case InputEvents.Actions.Jump:
                if (OnJumpEvent != null)
                {
                    base.Fsm.Event(OnJumpEvent);
                }
                break;

            case InputEvents.Actions.Interact:
                if ((!Service.Get <PropService>().IsLocalUserUsingProp() || Service.Get <PropService>().CanActionsBeUsedWithProp()) && OnInteractEvent != null)
                {
                    base.Fsm.Event(OnInteractEvent);
                }
                break;

            case InputEvents.Actions.Snowball:
                if (OnThrowEvent != null)
                {
                    base.Fsm.Event(OnThrowEvent);
                }
                break;

            case InputEvents.Actions.Action1:
                if (OnAction1Event != null)
                {
                    base.Fsm.Event(OnAction1Event);
                }
                break;

            case InputEvents.Actions.Action2:
                if (OnAction2Event != null)
                {
                    base.Fsm.Event(OnAction2Event);
                }
                break;

            case InputEvents.Actions.Action3:
                if (OnAction3Event != null)
                {
                    base.Fsm.Event(OnAction3Event);
                }
                break;

            case InputEvents.Actions.Cancel:
                if (OnCancel != null)
                {
                    base.Fsm.Event(OnCancel);
                }
                break;

            case InputEvents.Actions.Torpedo:
                if (OnBoostEvent != null)
                {
                    base.Fsm.Event(OnBoostEvent);
                }
                break;
            }
            return(false);
        }
Exemple #19
0
 private bool onActionEvent(InputEvents.ActionEvent evt)
 {
     this.ActionButtonPressed(evt.Action);
     return(false);
 }
 private bool onActionEvent(InputEvents.ActionEvent evt)
 {
     processEvent(evt.Action, 0L);
     return(false);
 }