Синтаксис:
Используется csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Script : MonoBehaviour
{
public GameObject player;
void Start()
{
Rigidbody rb = GetComponent<Rigidbody>();
}
void Update()
{
if (Input.GetKeyUp(KeyCode.Space))
{
transform.position += Vector3.left / 8;
}
}
}
using System.Collections.Generic;
using UnityEngine;
public class Script : MonoBehaviour
{
public GameObject player;
void Start()
{
Rigidbody rb = GetComponent<Rigidbody>();
}
void Update()
{
if (Input.GetKeyUp(KeyCode.Space))
{
transform.position += Vector3.left / 8;
}
}
}