// Use this for initialization void Start() { if (Input.GetKey(KeyCode.Alpha1)) Application.LoadLevel("Level 1"); _startMenu = GameObject.FindGameObjectWithTag("StartMenu"); _copyright = GameObject.FindGameObjectWithTag("Copyright") .GetComponent<Text>(); _scoreText = GameObject.FindGameObjectWithTag("Score") .GetComponent<Text>(); _countdownText = GameObject.FindGameObjectWithTag("Countdown") .GetComponent<Text>(); _gameWinText = GameObject.FindGameObjectWithTag("GameWin") .GetComponent<Text>(); _gameLoseText = GameObject.FindGameObjectWithTag("GameLose") .GetComponent<Text>(); _credits = GameObject.FindGameObjectWithTag("Credits"); _credits.SetActive(false); var ship = GameObject.FindGameObjectWithTag("Player"); _shipMovement = ship.GetComponentInChildren<ShipMovement>(); _shipFireWeapon = ship.GetComponentInChildren<ShipFireWeapon>(); var camera = GameObject.FindGameObjectWithTag("MainCamera"); _cameraChase = camera.GetComponentInChildren<CameraChase>(); }
void Start() { fireTimer = new TimerController(); shipFireWeapon = GetComponent <ShipFireWeapon>(); }