Esempio n. 1
0
    public void Start()
    {
        planet = new PlanetGenerator(gameObject, m_GroundMaterial, m_OceanMaterial, withRocket);
        GameObject element = tree;

        if (!withRocket)
        {
            element = rock;
        }
        for (int i = 0; i < 20; i++)
        {
            GameObject ele = Instantiate(element, Vector3.zero, Quaternion.identity);
            planet.AddComponent(ele, 0.0025f, 0);
        }

        // if (withRocket)
        //{
        //planet.AddComponent(rocket, 0.003f, 0.015f);
        //RocketController rocketController = rocket.GetComponent<RocketController>();
        //rocketController.SetDirections();
        //}
    }