public class RubyController : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
(改变帧率)(类名)Application.(成员变量)targetFramRate=10;(update函数每秒调用次数改为10次)
}
// Update is called once per frame
void Update()
{
float horizontal = Input.GetAxis("Horizontal");
float Vertical = Input.GetAxis("Vertical");
Vector2 position = transform.position;
position.x = position.x + 3 * horizontal * Time.deltaTime;
position.y = position.y + 3 * Vertical * Time.deltaTime;
transform.position = position;
}
}