Game Development Reference
In-Depth Information
38.
public void StrafeLeft(){
39.
strafeLeft = true;
40.
strafeRight = false;
41.
}
42.
43.
public void Jump(){
44.
jump = true;
45.
}
46.
47.
public void Turn(float amount){
48.
transform.RotateAround(Vector3.up, amount);
49.
}
50.
51.
//Fixed update is better with physics
52.
void FixedUpdate () {
53.
//Player can direct character only
54.
//when it is on the ground
55.
//or stuck somewhere with near-zero vertical velocity
Search WWH ::




Custom Search