Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if (currentState == StateManager.Instance.currentState)
        {
            return;
        }
        currentState = StateManager.Instance.currentState;
        switch (currentState)
        {
        case StateManager.States.HUD:
            arms.MaximumVelocity          = armControlLimits.velocity;
            arms.MaximumAcceleration      = armControlLimits.acceleration;
            leftHand.MaximumVelocity      = handControlLimits.velocity;
            leftHand.MaximumAcceleration  = handControlLimits.acceleration;
            rightHand.MaximumVelocity     = handControlLimits.velocity;
            rightHand.MaximumAcceleration = handControlLimits.acceleration;
            break;

        default:
            arms.MaximumVelocity          = armDefault.velocity;
            arms.MaximumAcceleration      = armDefault.acceleration;
            leftHand.MaximumVelocity      = handDefault.velocity;
            leftHand.MaximumAcceleration  = handDefault.acceleration;
            rightHand.MaximumVelocity     = handDefault.velocity;
            rightHand.MaximumAcceleration = handDefault.acceleration;
            break;
        }
    }
Ejemplo n.º 2
0
 private void StateUpdated(StateManager.States newState)
 {
     if (newState == StateManager.States.SceneCreation)
     {
         m_session.Pause();
     }
 }
Ejemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     armDefault  = new VelAcc(arms.MaximumVelocity, arms.MaximumAcceleration);
     handDefault = new VelAcc(Mathf.Max(leftHand.MaximumVelocity, rightHand.MaximumVelocity),
                              Mathf.Max(leftHand.MaximumAcceleration, rightHand.MaximumAcceleration));
     currentState = StateManager.States.Training;
 }
Ejemplo n.º 4
0
 void Update()
 {
     // if state changed update visibility accordingly
     if (StateManager.Instance.currentState != internalState)
     {
         internalState = StateManager.Instance.currentState;
         SetVisibility(internalState != StateManager.States.HUD);
     }
 }
Ejemplo n.º 5
0
 private void StateUpdated(StateManager.States newState)
 {
     gameObject.SetActive(isDisplayedByDefault == ((int)state > (int)newState));
 }
Ejemplo n.º 6
0
 private void Start()
 {
     internalState = StateManager.Instance.currentState;
 }
Ejemplo n.º 7
0
 public int TimesStateVisited(StateManager.States state)
 {
     return(visitedStates.FindAll(x => x == state).Count);
 }
Ejemplo n.º 8
0
 private void UpdateText(StateManager.States newState)
 {
     text.text = newState.ToString();
 }