예제 #1
0
        void Update()
        {
            Int2 movementInput  = InputHelper.GetWASDMovement();
            int  elevationInput = Convert.ToInt32(Input.GetKey(KeyCode.E)) - Convert.ToInt32(Input.GetKey(KeyCode.Q));

            if (movementInput == Int2.zero && elevationInput == 0)
            {
                return;
            }

            Elevation = elevationRange.Clamp(Elevation + elevationInput * elevationSpeed * Time.deltaTime);
            Position += movementInput * Elevation * movementSpeed * Time.deltaTime;

            OnReoriented?.Invoke();
        }
예제 #2
0
 void Start()
 {
     OnReoriented?.Invoke();
 }