Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        // update the state machine
        _machine.update(Time.deltaTime);
        ray = Camera.main.ScreenPointToRay(Input.mousePosition);

        if (Input.GetKey(KeyCode.Escape))
        {
            _machine.changeState <HospitalIdle> ();
        }
    }
 void Update()
 {
     _machine.update(Time.deltaTime);
 }
Ejemplo n.º 3
0
 void Update()
 {
     sm.update(Time.deltaTime);
 }
Ejemplo n.º 4
0
 void Update()
 {
     // update the state machine
     _machine.update(Time.deltaTime);
 }
Ejemplo n.º 5
0
    void Update()
    {
        machine.update(Time.deltaTime);
        music.pitch = Time.timeScale;

        if (Input.GetKeyDown(KeyCode.Alpha1) && machine.currentState.GetType() != typeof(Phase1State))
        {
            currentlyResetting = true;
            machine.changeState <Phase1State>();
        }
        if (Input.GetKeyDown(KeyCode.Alpha2) && machine.currentState.GetType() != typeof(Phase2State))
        {
            currentlyResetting = true;
            machine.changeState <Phase2State>();
        }
        if (Input.GetKeyDown(KeyCode.Alpha3) && machine.currentState.GetType() != typeof(Phase3State))
        {
            currentlyResetting = true;
            machine.changeState <Phase3State>();
        }
        if (Input.GetKeyDown(KeyCode.Alpha4) && machine.currentState.GetType() != typeof(Phase4State))
        {
            currentlyResetting = true;
            machine.changeState <Phase4State>();
        }
        if (Input.GetKeyDown(KeyCode.Alpha5) && machine.currentState.GetType() != typeof(Phase5State))
        {
            currentlyResetting = true;
            machine.changeState <Phase5State>();
        }
        if (Input.GetKeyDown(KeyCode.Alpha6) && machine.currentState.GetType() != typeof(Phase6State))
        {
            currentlyResetting = true;
            machine.changeState <Phase6State>();
        }
        if (Input.GetKeyDown(KeyCode.Alpha7) && machine.currentState.GetType() != typeof(Phase7State))
        {
            currentlyResetting = true;
            machine.changeState <Phase7State>();
        }
        if (Input.GetKeyDown(KeyCode.Alpha8) && machine.currentState.GetType() != typeof(Phase8State))
        {
            currentlyResetting = true;
            machine.changeState <Phase8State>();
        }
        if (Input.GetKeyDown(KeyCode.Alpha9) && machine.currentState.GetType() != typeof(Phase9State))
        {
            currentlyResetting = true;
            machine.changeState <Phase9State>();
        }

        if (Input.GetKeyDown(KeyCode.E) && machine.currentState.GetType() != typeof(SkyPhase1State))
        {
            currentlyResetting = true;
            machine.changeState <SkyPhase1State>();
        }
        if (Input.GetKeyDown(KeyCode.R) && machine.currentState.GetType() != typeof(SkyPhase2State))
        {
            currentlyResetting = true;
            machine.changeState <SkyPhase2State>();
        }
        if (Input.GetKeyDown(KeyCode.T) && machine.currentState.GetType() != typeof(SkyPhase3State))
        {
            currentlyResetting = true;
            machine.changeState <SkyPhase3State>();
        }
    }
Ejemplo n.º 6
0
 // Update is called once per frame
 void Update()
 {
     stateMachine.update(Time.deltaTime);
 }