예제 #1
0
    public void GeneratePlanetPanel(GameObject selectedObject)
    {
        instanceUIPrefab = Instantiate(planetUIPrefab, transform);
        panel            = instanceUIPrefab.GetComponent <PlanetPanel>();
        panel.planet     = selectedObject;

        EnablePlanetPanel();
    }
예제 #2
0
    protected void Start()
    {
        //get the planet that was selected when this craft was instantiated
        targetPlanet = Main.getCurrentPlanet();

        planetpanel = GameObject.FindObjectOfType <PlanetPanel>();
        main        = GameObject.FindObjectOfType <Main>();

        //set tech level to control how fast this craft mines
        currentTechLevel = main.getTechLevel();
        speed           *= main.getTechLevel() * 1.5f;
        useSpeed        *= main.getTechLevel() * 1.5f;

        //craft are in use by default
        inUse = true;
    }
예제 #3
0
 // Use this for initialization
 void Start()
 {
     instance = this;
     planetPanel.SetActive(false);
 }