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; }
// Use this for initialization void Start() { level1Story = this.GetComponent("Level1StoryScript") as Level1StoryScript; newtonLevel1Controller = GameObject.Find("Newton").GetComponent("NewtonLevel1Controller") as NewtonLevel1Controller; newtonLevel1Controller.enabled = false; gameController = GameObject.Find("Controller").GetComponent("GameController") as GameController; consoleController = GameObject.Find("console").GetComponent("ConsoleController") as ConsoleController; student = GameObject.FindWithTag("Player").GetComponent("StudentModel") as StudentModel; ramTrigger = GameObject.Find("ram").GetComponent("RamTrigger") as RamTrigger; hovercraftController = GameObject.Find("hovercraft").GetComponent("HoverCraftController") as HoverCraftController; ramTrigger.RamKilledEvent += ramKilledListener; hovercraftController.SquashFailEvent += squashFailListener; }
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; }