Animeшник666
Просветленный
(29993)
2 месяца назад
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
public float speed = 5.0f;
void Update()
{
if (Input.GetKey(KeyCode.G))
{
MoveForward();
}
}
void MoveForward()
{
transform.Translate(Vector3.forward * speed * Time.deltaTime);
}
}