// Use this for initialization void Start() { trackObject = GameObject.Find("track"); throwBall = GameObject.Find("ThrowBall"); ballController = throwBall.GetComponent("ThrowBallController") as ThrowBallController; gui = GameObject.Find("console").GetComponent("ConsoleController") as ConsoleController; ram = GameObject.Find("ram").GetComponent("RamTrigger") as RamTrigger; ballController.setState(ThrowBallController.ON_CART); }
void Start() { locked = false; hovercraft = GameObject.Find("hovercraft").GetComponent("HoverCraftController") as HoverCraftController; ball = GameObject.Find("ThrowBall").GetComponent("ThrowBallController") as ThrowBallController; trackObject = GameObject.Find("track"); trigger = GameObject.Find("console").GetComponent("ConsoleTrigger") as ConsoleTrigger; TextRect = new Rect((Screen.width - BoardTexture.width) / 2, (Screen.height - BoardTexture.height) / 2, BoardTexture.width, BoardTexture.height); Controller = GameObject.Find("Controller").GetComponent("GameController") as GameController; }
void Start() { locked = false; hovercraft = GameObject.Find("hovercraft").GetComponent("HoverCraftController") as HoverCraftController; ball = GameObject.Find("ThrowBall").GetComponent("ThrowBallController") as ThrowBallController; trackObject = GameObject.Find("track"); trigger = GameObject.Find("console").GetComponent("ConsoleTrigger") as ConsoleTrigger; TextRect = new Rect((Screen.width - BoardTexture.width)/2, (Screen.height - BoardTexture.height)/2, BoardTexture.width, BoardTexture.height); Controller = GameObject.Find("Controller").GetComponent("GameController") as GameController; }
//set instance to this object only happends once per game startup void Awake() { throwPaperInstance = this; }