예제 #1
0
    public static PlanetList createPlanetDatabase()
    {
        asset = ScriptableObject.CreateInstance <PlanetList>();

        AssetDatabase.CreateAsset(asset, "Assets/Resources/Databases/PlanetDatabase.asset");
        AssetDatabase.SaveAssets();
        return(asset);
    }
        public PlanetNavigationBox()
        {
            InitializeComponent();

            _planetList = new PlanetList(Program.Repository);
            _planetList.CollectionChanged     += PlanetListChanged;
            _planetList.SelectedPlanetChanged += SelectedPlanetChanged;

            BindPlanetList();
        }
예제 #3
0
        /* Resets all entity lists to empty */
        private void ClearLists()
        {
            PlayerList.Clear();
            PlanetList.Clear();
            ProjectileList.Clear();
            BlackHoleList.Clear();
            BloodParticleList.Clear();

            EntityList.Clear();
            PhysicalObjectList.Clear();
            GravityPointList.Clear();
        }
예제 #4
0
        public void Add(Planet item)
        {
            Debug.Assert(item != null, "item is null.");

            /*
             * Color[] colorData = new Color[item.SourceRect.Width * item.SourceRect.Height];
             * item.Spritesheet.GetData<Color>(0, item.SourceRect, colorData, 0, colorData.Length);
             * Terrain.AddToTerrain((int)item.Position.X, (int)item.Position.Y, (int)item.Size.X, (int)item.Size.Y, false, true, true, colorData);
             */
            PlanetList.Add(item);
            EntityList.Add(item);
            GravityPointList.Add(item);
        }
예제 #5
0
        public static void RunOnce()
        {
            var typesToChange = new[] {
                typeof(PlanetClassD),
                typeof(PlanetClassF),
                typeof(PlanetClassM),
                typeof(PlanetClassS),
            };

            foreach (Type t in typesToChange)
            {
                Planet currPlanet = PlanetList.find(t.Name);
                currPlanet.AddStartingResource(PlanetHelper.Metal, 15);
                currPlanet.AddStartingResource(PlanetHelper.Bioplastic, 15);
                currPlanet.AddStartingResource(PlanetHelper.MedicalSupplies, 15);
                currPlanet.AddStartingSpecialization(PlanetHelper.Carrier, 4);
                currPlanet.AddStartingSpecialization(PlanetHelper.Constructor, 1);
            }
        }
예제 #6
0
 public Planet(string name, Planet parent)
 {
     Name       = name;
     Satellites = new PlanetList(this);
     Parent     = parent;
 }
예제 #7
0
 public Planet(string name)
 {
     Name       = name;
     Satellites = new PlanetList(this);
 }