示例#1
0
    private void onJelloportationStarted(Signal signal)
    {
        JelloportationStartedSignal jelloportationStartedSignal = (JelloportationStartedSignal)signal;
        JelloPlate destination = thisJelloporter.ChooseDestination(jelloportationStartedSignal.newJelloState);

        if (destination == thisJelloporter.TopPlate)
        {
            nextState = new JumpToTopPlate(thisJelloporter);
        }
        else
        {
            nextState = new JumpToBottomPlate(thisJelloporter);
        }
    }
示例#2
0
    private void Update()
    {
        if (currentState == null)
        {
            currentState = new JelloIdleState(this);
            currentState.Start();
        }

        JelloporterState nextState = currentState.Update();

        if (nextState != currentState)
        {
            currentState.End();
            currentState = nextState;
            currentState.Start();
        }
    }
示例#3
0
 private void onJelloportationFinished(Signal signal)
 {
     nextState = new JelloIdleState(thisJelloporter);
 }
示例#4
0
 public JumpToBottomPlate(Jelloporter thisJelloporter) : base(thisJelloporter)
 {
     nextState = this;
 }
示例#5
0
 public JelloIdleState(Jelloporter thisJelloporter) : base(thisJelloporter)
 {
     this.nextState = this;
 }