コード例 #1
0
        public StationBuilder GetStationBuilder(Planet planet)
        {
            List<Weapon> weapons = new List<Weapon>();

            StationBuilder temp = new StationBuilder(Content.Load<Texture2D>("Stations/StationBuilder"),
                            new Vector2(planet.X + planet.Width + 30, planet.Y + planet.Height + 30),
                            new Vector2(Scales.EightTenth), 0.1f, Player.Race.Speed, Player.Race.Defence, 1f, 1000, 2000, "Station Builder", Player.Name,
                            Circle, weapons);
            temp.PositionFromCenter = planet.PositionFromCenter;
            return temp;
        }
コード例 #2
0
        public StationOnBuilding GetStationOnBuilding(StationBuilder builder)
        {
            Texture2D first = Content.Load<Texture2D>("Stations/StationOnBuildingStage1");
            Texture2D second = Content.Load<Texture2D>("Stations/StationOnBuildingStage2");
            Texture2D third = Content.Load<Texture2D>("Stations/StationOnBuildingStage3");
            Texture2D fourth = Content.Load<Texture2D>("Stations/StationOnBuildingStage4");

            Texture2D progressTexture = Content.Load<Texture2D>("UI/Lines/YellowLine");
            Vector2 progressPosition = new Vector2(builder.Position.X, builder.Position.Y - progressTexture.Height - 5);

            ProgressBar progress = new ProgressBar(progressTexture, progressPosition, new Vector2(Scales.None));

            StationOnBuilding temp = new StationOnBuilding(first, second, third, fourth, builder.Position, new Vector2(Scales.None), progress, 100);
            temp.Owner = "Enemy";//Player.Name;
            temp.Name = "Station On Build";
            temp.PositionFromCenter = builder.PositionFromCenter;

            return temp;
        }
コード例 #3
0
        //---------------------------------------------------------------
        //STATION BUILDER BUILDING START
        //---------------------------------------------------------------
        private void StationBuilderBuildingStart(StationBuilder builder)
        {
            //Добавлять стэйшнонбилд до всех корабелй в системе (вообще надо сделать сортировку, ато заебаться так можно)
            StationOnBuilding temp = StationCreator.GetStationOnBuilding(builder);

            screens[currentScreen].Objects[currentScreen].ToSolarSystem().Objects.Remove(builder);

            temp.OnBuildingComplete += new StationOnBuilding.OnBuildingCompleteHandler(StationOnBuildingComplete);

            screens[currentScreen].Objects[currentScreen].ToSolarSystem().Objects.Add(temp);
        }