Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        sat = Object.FindObjectOfType <Satellite> ();

        //randomize size of the planet
        float scale = Random.Range(1.2f, 1.8f);

        this.transform.localScale = new Vector3(scale, scale, 1);
        //randomize rotation speed/direction
        int rotate = Random.Range(-100, 100);

        rot = GetComponent <Rotate> ();
        rot.rotation_speed = rotate;

        //creating the rarity of the planet, and biome based on it. Also generates hazards and resources as part of the biome

        rarity = new Rarity();
        rarity.Init();
        biome = rarity.getBiome();

        m_SpriteRenderer = GetComponent <SpriteRenderer>();
        // m_SpriteRenderer.color = Color.black;
    }