예제 #1
0
        public DarkPortal(int tileX, int tileY, ManagerMouse managerMouse, ManagerMap managerMap, ManagerUnits managerUnits)
            : base(tileX, tileY, 128, 128, managerMouse, managerMap, managerUnits)
        {
            information = new InformationBuilding("Dark Portal", 1000, 0, 0, Util.Units.NONE, 0, Util.Buildings.DARK_PORTAL);

            Dictionary <AnimationType, List <Sprite> > sprites = new Dictionary <AnimationType, List <Sprite> >();
            List <Sprite> spriteBuilding = new List <Sprite>();

            // NORMAL
            spriteBuilding.Add(new Sprite(325, 658, 128, 128));

            sprites.Add(AnimationType.WALKING, spriteBuilding);

            Dictionary <string, Frame> animations = new Dictionary <string, Frame>();

            animations.Add("normal", new Frame(0, 1));

            this.animations = new Animation(sprites, animations, "normal", width, height, false, 0);

            textureName = "Human Buildings (Summer)";

            isBuilding      = false;
            isPlaceSelected = false;
            isStartBuilding = false;

            isWorking = true;

            managerMap.AddWalls(Position, width / 32, height / 32);
        }
예제 #2
0
        public Barracks(int tileX, int tileY, ManagerMouse managerMouse, ManagerMap managerMap, ManagerUnits managerUnits) :
            base(tileX, tileY, managerMouse, managerMap, managerUnits)
        {
            information = new InformationBuilding("Barracks", 800, 700, 450, Util.Units.PEASANT, 200 * Warcraft.FPS, Util.Buildings.BARRACKS);

            Dictionary <AnimationType, List <Sprite> > sprites = new Dictionary <AnimationType, List <Sprite> >();
            List <Sprite> spriteBuilding = new List <Sprite>();

            // BUILDING
            spriteBuilding.Add(new Sprite(576, 708, 48, 39));
            spriteBuilding.Add(new Sprite(572, 836, 61, 52));
            spriteBuilding.Add(new Sprite(135, 132, 116, 128));
            spriteBuilding.Add(new Sprite(135, 4, 128, 128));

            sprites.Add(AnimationType.WALKING, spriteBuilding);

            Dictionary <string, Frame> animations = new Dictionary <string, Frame>();

            animations.Add("building", new Frame(0, 4));

            this.animations = new Animation(sprites, animations, "building", width, height, false, information.BuildTime / spriteBuilding.Count);

            textureName = "Human Buildings (Summer)";

            commands.Add(new BuilderUnits(Util.Units.ELVEN_ARCHER, managerUnits, ElvenArcher.Information as InformationUnit));
            commands.Add(new BuilderUnits(Util.Units.FOOTMAN, managerUnits, Footman.Information as InformationUnit));
        }
예제 #3
0
        public ChickenFarm(int tileX, int tileY, ManagerMouse managerMouse, ManagerMap managerMap, ManagerUnits managerUnits) :
            base(tileX, tileY, 64, 64, managerMouse, managerMap, managerUnits)
        {
            information = new InformationBuilding("Chicken Farm", 400, 500, 450, Util.Units.PEASANT, 100 * Warcraft.FPS, Util.Buildings.CHICKEN_FARM);

            Dictionary <AnimationType, List <Sprite> > sprites = new Dictionary <AnimationType, List <Sprite> >();
            List <Sprite> spriteBuilding = new List <Sprite>();

            // BUILDING
            spriteBuilding.Add(new Sprite(576, 708, 48, 39));
            spriteBuilding.Add(new Sprite(572, 836, 61, 52));
            spriteBuilding.Add(new Sprite(398, 73, 63, 59));
            spriteBuilding.Add(new Sprite(398, 4, 64, 64));

            sprites.Add(AnimationType.WALKING, spriteBuilding);

            Dictionary <string, Frame> animations = new Dictionary <string, Frame>();

            animations.Add("building", new Frame(0, 4));

            this.animations = new Animation(sprites, animations, "building", width, height, false, information.BuildTime / spriteBuilding.Count);

            textureName = "Human Buildings (Summer)";

            unselected = true;
        }
예제 #4
0
        public TownHall(int tileX, int tileY, ManagerMouse managerMouse, ManagerMap managerMap, ManagerUnits managerUnits) :
            base(tileX, tileY, 128, 128, managerMouse, managerMap, managerUnits)
        {
            information = new InformationBuilding("Town Hall", 1200, 1200, 800, Util.Units.PEASANT, 300, Util.Buildings.TOWN_HALL);

            Dictionary <AnimationType, List <Sprite> > sprites = new Dictionary <AnimationType, List <Sprite> >();
            List <Sprite> spriteBuilding = new List <Sprite>();

            // BUILDING
            spriteBuilding.Add(new Sprite(576, 708, 48, 39));
            spriteBuilding.Add(new Sprite(572, 836, 61, 52));
            spriteBuilding.Add(new Sprite(270, 154, 111, 95));
            spriteBuilding.Add(new Sprite(270, 17, 119, 104));

            sprites.Add(AnimationType.WALKING, spriteBuilding);

            Dictionary <string, Frame> animations = new Dictionary <string, Frame>();

            animations.Add("building", new Frame(0, 4));

            this.animations = new Animation(sprites, animations, "building", width, height, false, information.BuildTime / sprites.Count);

            ui          = new UI.Buildings.TownHall(managerMouse, this);
            textureName = "Human Buildings (Summer)";

            commands.Add(new BuilderUnits(Util.Units.PEASANT, Peasant.Information));
        }
예제 #5
0
        public AltarOfStorms(int tileX, int tileY, ManagerMouse managerMouse, ManagerMap managerMap, ManagerUnits managerUnits) :
            base(tileX, tileY, managerMouse, managerMap, managerUnits)
        {
            information = new InformationBuilding("Altar of Storms", 700, 900, 500, Util.Units.PEON, 175 * Warcraft.FPS, Util.Buildings.ALTAR_OF_STORMS);

            Dictionary <AnimationType, List <Sprite> > sprites = new Dictionary <AnimationType, List <Sprite> >();
            List <Sprite> spriteBuilding = new List <Sprite>();

            // BUILDING
            spriteBuilding.Add(new Sprite(576, 708, 48, 39));
            spriteBuilding.Add(new Sprite(572, 836, 61, 52));
            spriteBuilding.Add(new Sprite(217, 252, 91, 86));
            spriteBuilding.Add(new Sprite(308, 242, 96, 96));

            sprites.Add(AnimationType.WALKING, spriteBuilding);

            Dictionary <string, Frame> animations = new Dictionary <string, Frame>();

            animations.Add("building", new Frame(0, 4));

            this.animations = new Animation(sprites, animations, "building", width, height, false, information.BuildTime / spriteBuilding.Count);

            textureName = "Orc Buildings (Summer) ";

            ui = new UI.Buildings.AltarOfStorms(this);
        }
예제 #6
0
        public Church(int tileX, int tileY, ManagerMouse managerMouse, ManagerMap managerMap, ManagerUnits managerUnits) :
            base(tileX, tileY, managerMouse, managerMap, managerUnits)
        {
            information = new InformationBuilding("Church", 700, 900, 500, Util.Units.PEASANT, 175 * Warcraft.FPS, Util.Buildings.CHURCH);

            Dictionary <AnimationType, List <Sprite> > sprites = new Dictionary <AnimationType, List <Sprite> >();
            List <Sprite> spriteBuilding = new List <Sprite>();

            // BUILDING
            spriteBuilding.Add(new Sprite(576, 708, 48, 39));
            spriteBuilding.Add(new Sprite(572, 836, 61, 52));
            spriteBuilding.Add(new Sprite(308, 365, 87, 91));
            spriteBuilding.Add(new Sprite(308, 264, 94, 96));

            sprites.Add(AnimationType.WALKING, spriteBuilding);

            Dictionary <string, Frame> animations = new Dictionary <string, Frame>();

            animations.Add("building", new Frame(0, 4));

            this.animations = new Animation(sprites, animations, "building", width, height, false, information.BuildTime / spriteBuilding.Count);

            textureName = "Human Buildings (Summer)";

            ui = new UI.Buildings.Church(this);
        }
예제 #7
0
        public GoldMine(int tileX, int tileY, ManagerMouse managerMouse, ManagerMap managerMap, ManagerUnits managerUnits)
            : base(tileX, tileY, 96, 96, managerMouse, managerMap, managerUnits)
        {
            information = new InformationBuilding("Gold Mine", 25500, 0, 0, Util.Units.NONE, 0, Util.Buildings.GOLD_MINE);

            Dictionary <AnimationType, List <Sprite> > sprites = new Dictionary <AnimationType, List <Sprite> >();
            List <Sprite> spriteBuilding = new List <Sprite>();

            // NORMAL
            spriteBuilding.Add(new Sprite(26, 661, 96, 89));
            // WORKING
            spriteBuilding.Add(new Sprite(26, 757, 96, 89));

            sprites.Add(AnimationType.WALKING, spriteBuilding);

            Dictionary <string, Frame> animations = new Dictionary <string, Frame>();

            animations.Add("normal", new Frame(0, 1));
            animations.Add("working", new Frame(1, 1));

            this.animations = new Animation(sprites, animations, "normal", width, height, false, 0);

            ui          = new UI.Buildings.GoldMine(managerMouse, this);
            textureName = "Human Buildings (Summer)";

            unselected = true;
            isWorking  = true;

            managerMap.AddWalls(position, width / 32, height / 32);
        }
예제 #8
0
        public GreatHall(int tileX, int tileY, ManagerMouse managerMouse, ManagerMap managerMap, ManagerUnits managerUnits) :
            base(tileX, tileY, managerMouse, managerMap, managerUnits)
        {
            information = new InformationBuilding("Great Hall", 1200, 1200, 800, Util.Units.PEON, 250 * Warcraft.FPS, Util.Buildings.GREAT_HALL);

            Dictionary <AnimationType, List <Sprite> > sprites = new Dictionary <AnimationType, List <Sprite> >();
            List <Sprite> spriteBuilding = new List <Sprite>();

            // BUILDING
            spriteBuilding.Add(new Sprite(560, 737, 48, 39));
            spriteBuilding.Add(new Sprite(556, 865, 61, 52));
            spriteBuilding.Add(new Sprite(25, 555, 101, 100));
            spriteBuilding.Add(new Sprite(144, 543, 116, 119));

            sprites.Add(AnimationType.WALKING, spriteBuilding);

            Dictionary <string, Frame> animations = new Dictionary <string, Frame>();

            animations.Add("building", new Frame(0, 4));

            this.animations = new Animation(sprites, animations, "building", width, height, false, information.BuildTime / spriteBuilding.Count);

            textureName = "Orc Buildings (Summer) ";

            commands.Add(new BuilderUnits(Util.Units.PEON, managerUnits, Peon.Information as InformationUnit));
        }
예제 #9
0
        public PigFarm(int tileX, int tileY, ManagerMouse managerMouse, ManagerMap managerMap, ManagerUnits managerUnits) :
            base(tileX, tileY, 64, 64, managerMouse, managerMap, managerUnits)
        {
            information = new InformationBuilding("Pig Farm", 400, 500, 250, Util.Units.PEON, 100 * Warcraft.FPS, Util.Buildings.PIG_FARM);

            Dictionary <AnimationType, List <Sprite> > sprites = new Dictionary <AnimationType, List <Sprite> >();
            List <Sprite> spriteBuilding = new List <Sprite>();

            // BUILDING
            spriteBuilding.Add(new Sprite(560, 737, 48, 39));
            spriteBuilding.Add(new Sprite(556, 865, 61, 52));
            spriteBuilding.Add(new Sprite(272, 603, 63, 64));
            spriteBuilding.Add(new Sprite(337, 603, 64, 64));

            sprites.Add(AnimationType.WALKING, spriteBuilding);

            Dictionary <string, Frame> animations = new Dictionary <string, Frame>();

            animations.Add("building", new Frame(0, 4));

            this.animations = new Animation(sprites, animations, "building", width, height, false, information.BuildTime / spriteBuilding.Count);

            textureName = "Orc Buildings (Summer) ";

            unselected = true;
        }
예제 #10
0
        public Barracks(int tileX, int tileY, ManagerMouse managerMouse, ManagerMap managerMap, ManagerUnits managerUnits) :
            base(tileX, tileY, 96, 96, managerMouse, managerMap, managerUnits)
        {
            information = new InformationBuilding("Barracks", 800, 700, 400, Util.Units.PEON, 200 * Warcraft.FPS, Util.Buildings.ORC_BARRACKS);

            Dictionary <AnimationType, List <Sprite> > sprites = new Dictionary <AnimationType, List <Sprite> >();
            List <Sprite> spriteBuilding = new List <Sprite>();

            // BUILDING
            spriteBuilding.Add(new Sprite(560, 737, 48, 39));
            spriteBuilding.Add(new Sprite(556, 865, 61, 52));
            spriteBuilding.Add(new Sprite(18, 260, 88, 77));
            spriteBuilding.Add(new Sprite(109, 242, 95, 96));

            sprites.Add(AnimationType.WALKING, spriteBuilding);

            Dictionary <string, Frame> animations = new Dictionary <string, Frame>();

            animations.Add("building", new Frame(0, 4));

            this.animations = new Animation(sprites, animations, "building", width, height, false, information.BuildTime / spriteBuilding.Count);

            textureName = "Orc Buildings (Summer) ";

            commands.Add(new BuilderUnits(Util.Units.GRUNT, managerUnits, Grunt.Information as InformationUnit));
            commands.Add(new BuilderUnits(Util.Units.TROLL_AXETHROWER, managerUnits, TrollAxethrower.Information as InformationUnit));
        }