예제 #1
0
 private void onAction(LocomotionController.LocomotionAction action, object userData = null)
 {
     if (isInTrigger && action == LocomotionController.LocomotionAction.Jump)
     {
         sendFSMEvent(JumpEvent);
     }
 }
예제 #2
0
        private void OnDoAction(LocomotionController.LocomotionAction action, object userData)
        {
            switch (action)
            {
            case LocomotionController.LocomotionAction.Interact:
                break;

            case LocomotionController.LocomotionAction.Jump:
            case LocomotionController.LocomotionAction.Action1:
            case LocomotionController.LocomotionAction.Action2:
            case LocomotionController.LocomotionAction.Action3:
                if (!isActivating)
                {
                    jumpsRemaining--;
                    setText($"Jumps Left:\n{jumpsRemaining}");
                    if (jumpsRemaining <= 0)
                    {
                        isActivating = true;
                        StartCoroutine(ActivatePlatform());
                    }
                }
                break;

            case LocomotionController.LocomotionAction.Torpedo:
            case LocomotionController.LocomotionAction.SlideTrick:
            case LocomotionController.LocomotionAction.ChargeThrow:
            case LocomotionController.LocomotionAction.LaunchThrow:
                break;
            }
        }
예제 #3
0
 private void onAction(LocomotionController.LocomotionAction action, object userData = null)
 {
     if (isInTrigger && action == LocomotionController.LocomotionAction.Jump)
     {
         Service.Get <QuestService>().SendEvent(JumpEvent);
     }
 }
예제 #4
0
    private void sendDoActionEvent(LocomotionController.LocomotionAction actionType, object userData = null)
    {
        switch (actionType)
        {
        case LocomotionController.LocomotionAction.SlideTrick:
        case LocomotionController.LocomotionAction.ChargeThrow:
        case LocomotionController.LocomotionAction.LaunchThrow:
        case LocomotionController.LocomotionAction.Interact:
            break;

        case LocomotionController.LocomotionAction.Jump:
            setLocomotionActionEvent(LocomotionAction.Jump, setDirection: true);
            break;

        case LocomotionController.LocomotionAction.Torpedo:
            setLocomotionActionEvent(LocomotionAction.Torpedo, setDirection: true);
            break;

        case LocomotionController.LocomotionAction.Action1:
            setLocomotionActionEvent(LocomotionAction.Action1);
            break;

        case LocomotionController.LocomotionAction.Action2:
            setLocomotionActionEvent(LocomotionAction.Action2);
            break;

        case LocomotionController.LocomotionAction.Action3:
            setLocomotionActionEvent(LocomotionAction.Action3);
            break;
        }
    }
예제 #5
0
 public void BroadcastOnDoAction(LocomotionController.LocomotionAction action, object userData = null)
 {
     if (this.OnDoActionEvent != null)
     {
         this.OnDoActionEvent(action, userData);
     }
 }
    private void OnDoAction(LocomotionController.LocomotionAction action, object userData)
    {
        switch (action)
        {
        case LocomotionController.LocomotionAction.Torpedo:
        case LocomotionController.LocomotionAction.SlideTrick:
        case LocomotionController.LocomotionAction.ChargeThrow:
        case LocomotionController.LocomotionAction.LaunchThrow:
            break;

        case LocomotionController.LocomotionAction.Interact:
            base.Fsm.Event(InteractEvent);
            break;

        case LocomotionController.LocomotionAction.Action1:
            base.Fsm.Event(Action1Event);
            break;

        case LocomotionController.LocomotionAction.Action2:
            base.Fsm.Event(Action2Event);
            break;

        case LocomotionController.LocomotionAction.Action3:
            base.Fsm.Event(Action3Event);
            break;

        case LocomotionController.LocomotionAction.Jump:
            base.Fsm.Event(JumpEvent);
            break;
        }
    }
 private void onLocomotionBroadcasterDoAction(LocomotionController.LocomotionAction action, object userData = null)
 {
     if (action == LocomotionController.LocomotionAction.Interact)
     {
         LODWeightingCurve lODWeightingCurve = base.gameObject.AddComponent <LODWeightingCurve>();
         lODWeightingCurve.CurveData = Data.CurveData;
         lODWeightingCurve.Setup();
     }
 }
예제 #8
0
 private void OnLocomotionBroadcasterDoAction(LocomotionController.LocomotionAction action, object userData = null)
 {
     if (!(Prop != null))
     {
         return;
     }
     switch (action)
     {
     case LocomotionController.LocomotionAction.Action1:
     case LocomotionController.LocomotionAction.Action2:
     case LocomotionController.LocomotionAction.Action3:
         locomotionTracker.SetCurrentController <RunController>();
         if (Prop.PropDef.PropType == PropDefinition.PropTypes.InteractiveObject && Prop.IsOwnerLocalPlayer)
         {
             Service.Get <ICPSwrveService>().Action("game.interactive_object", Prop.PropDef.name, action.ToString());
         }
         break;
     }
 }