Пример #1
0
 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;
 }
Пример #2
0
 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;
 }