// Start is called before the first frame update
    void Start()
    {
        _spawnManager = GameObject.Find("Mihir_Spawn_Manager").GetComponent <Mihir_SpawnManager>();
        _levelManager = GameObject.Find("Mihir_LevelManager").GetComponent <Mihir_LevelManager>();
        _spaceship    = GameObject.Find("Mihir_Spaceship").GetComponent <Mihir_Spaceship>();


        _livesText.text = "Lives: " + 3;

        _gameOverText.gameObject.SetActive(false);

        divider1.transform.position = new Vector3(dividerX, dividerY1, 0);
        divider2.transform.position = new Vector3(dividerX, dividerY2, 0);
    }
예제 #2
0
    // Start is called before the first frame update
    private void Start()
    {
        _spaceship = GameObject.Find("Mihir_Spaceship").GetComponent <Mihir_Spaceship>();

        /*if (_spaceship.transform.rotation.z < 0)
         * {
         *  movement = new Vector3(Mathf.Sin(Mathf.PI / 9), Mathf.Cos(Mathf.PI / 9), 0);
         * }
         * if (_spaceship.transform.rotation.z > 0)
         * {
         *  movement = new Vector3(-Mathf.Sin(Mathf.PI / 9), Mathf.Cos(Mathf.PI / 9), 0);
         * }
         * if (_spaceship.transform.rotation.z == 0)
         * {*/
        movement = new Vector3(0, 1, 0);
        //}
    }
    // Start is called before the first frame update
    private void Start()
    {
        //transform.position = new Vector3(0, screenEdgeHeight, 0);

        _spaceship = GameObject.Find("Mihir_Spaceship").GetComponent <Mihir_Spaceship>();
    }