Exemple #1
0
 void LateUpdate()
 {
     _State.Update();
     if (Input.GetKeyDown(KeyCode.T))
     {
         ShakeCamera(10, 1);
     }
 }
Exemple #2
0
    // Update is called once per frame
    public void LateUpdate()
    {
        current.Update();

        //update hitted effect

        #region TO DELETE

        Vector3 newFor = Camera.main.transform.forward * Input.GetAxis("Vertical") + Camera.main.transform.right * Input.GetAxis("Horizontal");
        newFor.y         = 0;
        target.position += newFor * 3 * Time.deltaTime;
        #endregion
    }
Exemple #3
0
    //void Update() { }


    public void CameraHandler(float in_time)
    {
        if (_player == null)
        {
            return;
        }

        _desired_camera_point.SetCurrentPosition(DesiredCameraPos(), in_time);
        UpdateCameraVelocityAndPosition(in_time);

        EStateType new_state = _current_state.Update(in_time);

        if (new_state != _current_state.GetStateType())
        {
            ICameraState old_state = _current_state;
            _current_state = CreateStateByType(new_state);
            _current_state.Update(0f);
        }
    }
 void Update()
 {
     _State.Update();
 }