private void OnEnable() { controller = (BoundaryController)target; lastTool = Tools.current; Tools.current = Tool.None; }
void Awake() { if (instance == null) { instance = this; } }
void Start() { bc = FindObjectOfType <BoundaryController>(); _gcStart = gc.position; _playerSpawn = player.transform.position; isScoreIncreasing = true; if (PlayerPrefs.GetFloat("HighScore") != null) { highScore = PlayerPrefs.GetFloat("HighScore"); } deathScreen.gameObject.SetActive(false); }
void Start() { asteroidTag = asteroid.tag; BoundaryController boundaryController = (BoundaryController)world.GetComponent(typeof(BoundaryController)); worldXSize = boundaryController.WorldXSize; worldZSize = boundaryController.WorldZSize; minSize = worldXSize < worldZSize ? worldXSize : worldZSize; StartCoroutine(waveManager()); playerScoreText = (GUIText)Instantiate(playerScoreTextPrefab, playerScoreTextPrefab.transform.position, playerScoreTextPrefab.transform.rotation); gameOverText = (GUIText)Instantiate(gameOverTextPrefab, gameOverTextPrefab.transform.position, gameOverTextPrefab.transform.rotation); restartText = (GUIText)Instantiate(restartTextPrefab, restartTextPrefab.transform.position, restartTextPrefab.transform.rotation); playerScoreText.text = "Player score: 0"; gameOverText.text = ""; restartText.text = ""; playerScore = 0; isGameOver = false; }
void Start() { bc = FindObjectOfType <BoundaryController>(); }