Пример #1
0
 void FinishMoweInput()
 {
     if (Input.GetKeyDown(KeyCode.F))
     {
         MechanicMowerEvents.BroadcastOnMechanicMowerFinished();
     }
 }
Пример #2
0
 void StartMoweInput()
 {
     if (Input.GetKeyDown(KeyCode.E))
     {
         MechanicMowerEvents.BroadcastOnMechanicMowerStarted();
     }
 }
Пример #3
0
 void RunFixedUpdateEvents()
 {
     if (mowerBehaviour.IsWorking)
     {
         MechanicMowerEvents.BroadcastOnCustomFixedUpdate();
     }
 }
Пример #4
0
        void UpdateMowerMovementInput()
        {
//            horizontalInput = Input.GetAxis("Horizontal");
//            verticalInput = Input.GetAxis("Vertical");
            horizontalInput = Input.GetAxisRaw("Horizontal");
            verticalInput   = Input.GetAxisRaw("Vertical");
            var normalizedInputVector = new Vector3(horizontalInput, verticalInput, 0f).normalized;

            MechanicMowerEvents.BroadcastOnMovementUpdate(normalizedInputVector);
        }
Пример #5
0
 void LateUpdate()
 {
     MechanicMowerEvents.BroadcastOnCustomLateUpdate();
 }