コード例 #1
0
    /// <summary>
    /// Adds all the solar bodies in the system to a list of navigable gameobjects
    /// </summary>
    void FillSolarBodies()
    {
        solarBodies = new List <GameObject>();

        solarBodies.Add(solarManager.getSun());

        foreach (SolarBody solarBody in solarManager.GetSolarBodies())
        {
            solarBodies.Add(solarBody.gameObject);
            AddSatellites(solarBody);
        }
    }
コード例 #2
0
    /// <summary>
    /// Loops through each solar body and draws their respective interfaces
    /// </summary>
    /// <returns></returns>
    bool DrawSolarBodies()
    {
        if (solarManager.GetSolarBodies().Count == 0)
        {
            return(!REFRESH_EDITOR);
        }

        GUILayout.BeginVertical();

        foreach (SolarBody solarBody in solarManager.GetSolarBodies())
        {
            if (DrawSolarBody(solarBody))
            {
                return(REFRESH_EDITOR);
            }
        }

        GUILayout.EndVertical();

        return(!REFRESH_EDITOR);
    }
コード例 #3
0
ファイル: MapManager.cs プロジェクト: nikolai-momot/Perlinium
    /// <summary>
    /// Generates a texture map for every solarbody in the system
    /// </summary>
    public void GenerateMaps()
    {
        if (solarManager == null)
        {
            solarManager = FindObjectOfType <SolarManager>();
        }

        SolarBody sun = GameObject.Find("Sun").GetComponent <SolarBody>();

        GenerateMap(sun);

        GenerateSatelliteMaps(solarManager.GetSolarBodies());
    }