Пример #1
0
 // Update is called once per frame
 void Update()
 {
     if (m_Game.IsGameStarted() && !m_Game.IsFinish())
     {
         m_CarObj.SetInput(Input.GetAxisRaw("Horizontal"));
         m_CarObj.Accelerate(Input.GetKey(KeyCode.Space));
     }
 }
Пример #2
0
        void Update()
        {
            if (m_Game.IsGameStarted() && !m_Game.IsFinish())
            {
                float axis = (InputImage.transform.position.x - m_StartX) / InputXOffset;

                m_CarObj.SetInput(axis);
                m_CarObj.Accelerate(m_IsNitro);
            }
        }