Код: Выделить всё
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Space) == true)
{
Debug.Log("Space key pressed");
myRigidbody.linearVelocity = Vector2.up * FlapStrength;
}
else
Debug.Log("Key Stroke Not Received");
}
Код: Выделить всё
Key Stroke Not Received
UnityEngine.Debug:Log (object)
Flappy_Bird:Update () (at Assets/Flappy_Bird.cs:22)
Key Stroke Not Received
UnityEngine.Debug:Log (object)
Flappy_Bird:Update () (at Assets/Flappy_Bird.cs:22)
Key Stroke Not Received
UnityEngine.Debug:Log (object)
Flappy_Bird:Update () (at Assets/Flappy_Bird.cs:22)
Key Stroke Not Received
UnityEngine.Debug:Log (object)
Flappy_Bird:Update () (at Assets/Flappy_Bird.cs:22)
Подробнее здесь: https://stackoverflow.com/questions/790 ... p-by-unity
Мобильная версия