Ejemplo n.º 1
0
        private void OnEnable()
        {
            controller = (BoundaryController)target;

            lastTool      = Tools.current;
            Tools.current = Tool.None;
        }
Ejemplo n.º 2
0
 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);
    }
Ejemplo n.º 4
0
    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;
    }
Ejemplo n.º 5
0
 void Start()
 {
     bc = FindObjectOfType <BoundaryController>();
 }