예제 #1
0
        public void mineralPickup()
        {
            if (OuterSpace.thisPlanet.mineralmap[(int)(((OuterSpace.thisPlanet.PlanetMaps.BigMapX / 2.0f) - X)),
                                                 (int)(((OuterSpace.thisPlanet.PlanetMaps.BigMapY / 2.0f) - Y))])
            {
                int     seed;
                mineral cur_mineral;

                seed = (int)(((OuterSpace.thisPlanet.PlanetMaps.BigMapX / 2.0f) - X)) +
                       (int)(((OuterSpace.thisPlanet.PlanetMaps.BigMapY / 2.0f) - Y));

                seed        = seed + OuterSpace.thisPlanet.uSeed;
                cur_mineral = new mineral(seed, OuterSpace.thisPlanet.Lithosphere, 1);

                OuterSpace.msgbox.pushmsgs(Convert.ToString(Convert.ToUInt16(cur_mineral.Volume / 10)) +
                                           " Cubic Meters Of " + cur_mineral.type);

                OuterSpace.thisPlanet.mineralmap[(int)(((OuterSpace.thisPlanet.PlanetMaps.BigMapX / 2) - X)),
                                                 (int)(((OuterSpace.thisPlanet.PlanetMaps.BigMapY / 2) - Y))] = false;

                updateterrian((int)(OuterSpace.TV.X), (int)(OuterSpace.TV.Y), true, true);
            }
        }
예제 #2
0
        public void mineralPickup()
        {
            if (OuterSpace.thisPlanet.mineralmap[(int)(((OuterSpace.thisPlanet.PlanetMaps.BigMapX / 2.0f) - X)),
                (int)(((OuterSpace.thisPlanet.PlanetMaps.BigMapY / 2.0f) - Y))])
            {
                int seed;
                mineral cur_mineral;

                seed = (int)(((OuterSpace.thisPlanet.PlanetMaps.BigMapX / 2.0f) - X)) +
                    (int)(((OuterSpace.thisPlanet.PlanetMaps.BigMapY / 2.0f) - Y));

                seed = seed + OuterSpace.thisPlanet.uSeed;
                cur_mineral = new mineral(seed, OuterSpace.thisPlanet.Lithosphere, 1);

                OuterSpace.msgbox.pushmsgs(Convert.ToString(Convert.ToUInt16(cur_mineral.Volume / 10)) +
                    " Cubic Meters Of " + cur_mineral.type);

                OuterSpace.thisPlanet.mineralmap[(int)(((OuterSpace.thisPlanet.PlanetMaps.BigMapX / 2) - X)),
                    (int)(((OuterSpace.thisPlanet.PlanetMaps.BigMapY / 2) - Y))] = false;

                updateterrian((int)(OuterSpace.TV.X), (int)(OuterSpace.TV.Y), true, true);
            }
        }