i have some code and i'm not sure on how to get a varaible into a if statement.
#pragma strict
public var number;
function Start () {
var number = Random.Range(2,2);
}
var myTimer : float = 10.0;
function Update () {
if (var number == 2){
transform.position.y = 9.320176;
transform.position.z = 0;
transform.position.x = 0;
}
}
↧