View difference between Paste ID: JRCHSF3L and YE8nDTGm
SHOW: | | - or go back to the newest paste.
1-
import UnityEngine
1+
using UnityEngine;
2
3-
class MovementScript (MonoBehaviour): 
3+
public class MovementScript : MonoBehaviour {
4
	public float moveSpeed = 50;
5-
		
5+
               
6-
	def FixedUpdate() {
6+
	public void FixedUpdate() {
7
		MaybeMove();
8-
	}
8+
       }
9
 
10-
	def MaybeMove(){
10+
	public void MaybeMove(){
11
		Vector3 moveDir = (Input.GetAxisRaw("Horizontal") * Vector3.right) + (Input.GetAxisRaw("Vertical") * Vector3.forward);
12-
		transform.Translate(moveDir.normalized * realSpeed * Time.deltaTime);
12+
		transform.Translate(moveDir.normalized * moveSpeed * Time.deltaTime);
13-
	}
13+
       }
14
}