Beispiel #1
0
 public Player(PuzzleEngineAlpha.Level.TileMap tileMap, PuzzleEngineAlpha.Camera.Camera camera, Vector2 location, Texture2D texture, float step, int frameWidth, int frameHeight, int collideWidth, int collideHeight)
     : base(tileMap, camera, location, frameWidth, frameHeight, collideWidth, collideHeight)
 {
     this.InitialLocation = location;
     this.animations.Add("run", new PuzzleEngineAlpha.Animations.AnimationStrip(texture, frameWidth, "run"));
     currentAnimation = "run";
     this.step        = step;
 }
Beispiel #2
0
 public Button(PuzzleEngineAlpha.Level.TileMap tileMap, PuzzleEngineAlpha.Camera.Camera camera, Vector2 location, Texture2D texture, int frameWidth, int frameHeight, string tag)
     : base(tileMap, camera, location, frameWidth, frameHeight)
 {
     this.animations.Add("active", new PuzzleEngineAlpha.Animations.AnimationStrip(texture, frameWidth, "active"));
     currentAnimation      = "active";
     tranparencyTransition = new PuzzleEngineAlpha.Animations.SmoothTransition(1.0f, 0.004f, 0.2f, 1.0f);
     this.enabled          = false;
     this.Tag = tag;
 }
        void InitializeGameScenes(GraphicsDevice graphicsDevice, ContentManager content)
        {
            PuzzleEngineAlpha.Level.TileMap gameTileMap = new PuzzleEngineAlpha.Level.TileMap(Vector2.Zero, content, 64, 64, 64, 64);
            MapHandlerScene gameMapHandler = new MapHandlerScene(content, gameTileMap, new PuzzleEngineAlpha.Databases.Level.BinaryLevelInfoSerialization(), new PuzzleEngineAlpha.Databases.Level.BinaryMapSerialization());

            gameScenes.Add("game", new GameScene(graphicsDevice, content, gameTileMap, Vector2.Zero));
            gameScenes.Add("menu", new Menu.MenuHandler(content, graphicsDevice, gameMapHandler, gameTileMap, this));
            gameScenes.Add("mapHandler", gameMapHandler);
        }
Beispiel #4
0
 public LoadMapMenu(GraphicsDevice graphicsDevice, ContentManager Content, MenuHandler menuHandler, PuzzleEngineAlpha.Scene.MapHandlerScene mapHandler, PuzzleEngineAlpha.Level.TileMap tileMap)
 {
     this.tileMap = tileMap;
     miniMap      = new PuzzleEngineAlpha.Level.MiniMap(Content, graphicsDevice, new Vector2(400, 300), new PuzzleEngineAlpha.Databases.Level.BinaryMapSerialization(), new PuzzleEngineAlpha.Databases.Level.BinaryLevelInfoSerialization());
     components   = new List <AGUIComponent>();
     InitializeGUI(Content, menuHandler);
     backGround      = Content.Load <Texture2D>(@"textures/whiteRectangle");
     this.mapHandler = mapHandler;
     PuzzleEngineAlpha.Resolution.ResolutionHandler.Changed += ResetSizes;
 }
 public HiddenWall(PuzzleEngineAlpha.Level.TileMap tileMap, PuzzleEngineAlpha.Camera.Camera camera, Vector2 location, Texture2D texture, int frameWidth, int frameHeight, string tag)
     : base(tileMap,camera,location, frameWidth, frameHeight)
 {
     this.animations.Add("active", new PuzzleEngineAlpha.Animations.AnimationStrip(texture, frameWidth, "active"));
     currentAnimation = "active";
     this.enabled = false;
     this.Tag = tag;
     tranparencyTransition = new PuzzleEngineAlpha.Animations.SmoothTransition(0.1f, 0.002f, 0.1f, 1.0f);
     Transparency = tranparencyTransition.Value;
     InteractionActors = new List<MapObject>();
 }
 public CloneBox(ActorManager actorManager, ParticleManager particleManager, PuzzleEngineAlpha.Level.TileMap tileMap, PuzzleEngineAlpha.Camera.Camera camera, Vector2 location, Texture2D texture, ContentManager content, int frameWidth, int frameHeight, string tag)
     : base(tileMap, camera, location, frameWidth, frameHeight)
 {
     this.content         = content;
     this.actorManager    = actorManager;
     this.particleManager = particleManager;
     this.animations.Add("active", new PuzzleEngineAlpha.Animations.AnimationStrip(texture, frameWidth, "active"));
     currentAnimation = "active";
     this.enabled     = false;
     this.Tag         = tag;
     playersAndClones = new Dictionary <Player, PlayerClone>();
 }
Beispiel #7
0
 public Pistol(ActorManager actorManager, ParticleManager particleManager, PuzzleEngineAlpha.Level.TileMap tileMap, PuzzleEngineAlpha.Camera.Camera camera, ContentManager content)
 {
     this.camera          = camera;
     this.bullets         = new List <Bullet>();
     this.actorManager    = actorManager;
     this.particleManager = particleManager;
     this.tileMap         = tileMap;
     this.content         = content;
     this.collideWidth    = 5;
     this.collideHeight   = 5;
     this.actorManager    = actorManager;
 }
Beispiel #8
0
 public Bullet(ActorManager actorManager, ParticleManager particleManager, PuzzleEngineAlpha.Level.TileMap tileMap, PuzzleEngineAlpha.Camera.Camera camera, Vector2 location, Vector2 velocity, Vector2 memento, ContentManager content, int frameWidth, int frameHeight, int collideWidth, int collideHeight)
     : base(tileMap, camera, location, frameWidth, frameHeight, collideWidth, collideHeight)
 {
     this.velocity        = velocity;
     this.memento         = memento;
     this.actorManager    = actorManager;
     this.particleManager = particleManager;
     this.animations.Add("bullet", new PuzzleEngineAlpha.Animations.AnimationStrip(content.Load <Texture2D>(@"Textures/Guns/bullet"), frameWidth, "bullet"));
     currentAnimation  = "bullet";
     this.actorManager = actorManager;
     this.Destroy      = false;
     this.enabled      = true;
 }
Beispiel #9
0
 public Player(ActorManager actorManager, PuzzleEngineAlpha.Level.TileMap tileMap, PuzzleEngineAlpha.Camera.Camera camera, Vector2 location, Texture2D texture, float step, int frameWidth, int frameHeight, int collideWidth, int collideHeight)
     : base(tileMap, camera, location, frameWidth, frameHeight, collideWidth, collideHeight)
 {
     this.InitialLocation = location;
     this.animations.Add("run", new PuzzleEngineAlpha.Animations.AnimationStrip(texture, frameWidth, "run"));
     currentAnimation      = "run";
     this.step             = step;
     movementScript        = new MovementScript();
     movementState         = 0;
     this.actorManager     = actorManager;
     this.IsActive         = false;
     tranparencyTransition = new PuzzleEngineAlpha.Animations.SmoothTransition(1.0f, 0.001f, 0.6f, 1.0f);
     IsActive    = false;
     Interaction = false;
 }
 public ActorMapper(ContentManager Content, PuzzleEngineAlpha.Level.TileMap tileMap)
 {
     black_gate_h  = Content.Load <Texture2D>(@"Textures/Gates/black_gate_h");
     black_gate_v  = Content.Load <Texture2D>(@"Textures/Gates/black_gate_v");
     blue_gate_h   = Content.Load <Texture2D>(@"Textures/Gates/blue_gate_h");
     blue_gate_v   = Content.Load <Texture2D>(@"Textures/Gates/blue_gate_v");
     yellow_gate_h = Content.Load <Texture2D>(@"Textures/Gates/yellow_gate_h");
     yellow_gate_v = Content.Load <Texture2D>(@"Textures/Gates/yellow_gate_v");
     button_yellow = Content.Load <Texture2D>(@"Textures/Buttons/button_yellow");
     button_blue   = Content.Load <Texture2D>(@"Textures/Buttons/button_blue");
     button_black  = Content.Load <Texture2D>(@"Textures/Buttons/button_black");
     coin          = Content.Load <Texture2D>(@"Textures/Items/coin");
     hidden_wall   = Content.Load <Texture2D>(@"Textures/Items/hidden_wall");
     clone_box     = Content.Load <Texture2D>(@"Textures/Items/clone_box");
     this.tileMap  = tileMap;
 }
Beispiel #11
0
        public PlayerClone(ActorManager actorManager, ParticleManager particleManager, PuzzleEngineAlpha.Level.TileMap tileMap, PuzzleEngineAlpha.Camera.Camera camera, Vector2 location, ContentManager content, int frameWidth, int frameHeight, int collideWidth, int collideHeight)
            : base(tileMap, camera, location, frameWidth, frameHeight, collideWidth, collideHeight)
        {
            this.actorManager    = actorManager;
            this.particleManager = particleManager;
            this.animations.Add("run", new PuzzleEngineAlpha.Animations.AnimationStrip(content.Load <Texture2D>(@"Textures/player"), frameWidth, "run"));
            currentAnimation  = "run";
            this.actorManager = actorManager;

            Reset();
        }