Exemplo n.º 1
0
    public void ChangeState(CameraState state)
    {
        if (cameraState != state)
        {
            switch (state)
            {
            case CameraState.idle:
                currentParameters = movingParameters;
                break;

            case CameraState.moving:
                currentParameters = movingParameters;
                break;

            case CameraState.braking:
                currentParameters = movingParameters;
                break;

            case CameraState.boost:
                currentParameters = boostParameters;
                break;

            case CameraState.superboost:
                currentParameters = boostParameters;
                break;
            }

            cameraState           = state;
            l_stateTransitionTime = 0;
        }
    }
Exemplo n.º 2
0
    protected override void OnActivated(StateParameters parameters)
    {
        MyDataParameter data;

        parameters.TryGetStateParameter(out data, new MyDataParameter(Random.Range(1337, 2674)));

        Debug.Log("BB: " + _myNumber + " << " + data.MyValue);
    }
Exemplo n.º 3
0
 protected override void OnActivated(StateParameters parameters)
 {
     Debug.Log("B: " + _myNumber);
     GameWorld.UserInput.KeyPressedEvent += OnKeyPressedEvent;
 }