Exemplo n.º 1
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;
 }
Exemplo n.º 2
0
 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>();
 }
Exemplo n.º 3
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;
 }
Exemplo n.º 4
0
        public MenuHandler(ContentManager Content, GraphicsDevice graphicsDevice, MapHandlerScene mapHandler, PuzzleEngineAlpha.Level.TileMap tileMap, ResolutionHandler resolutionHandler, GameSceneDirector sceneDirector)
        {
            this.graphicsDevice = graphicsDevice;
            menuWindows         = new Dictionary <string, IScene>();
            menuWindows.Add("mainMenu", new MainMenu(Content, this, sceneDirector));
            menuWindows.Add("loadMap", new LoadMapMenu(graphicsDevice, Content, this, mapHandler, tileMap));
            menuWindows.Add("settings", new SettingsMenu(Content, this, resolutionHandler));

            activeWindow = menuWindows["mainMenu"];
            IsActive     = false;
            currentState = new MenuStateEnum();
            currentState = MenuStateEnum.Hidden;
            transition   = new PuzzleEngineAlpha.Animations.SmoothTransition(0.0f, 0.011f, 0.0f, 1.0f);

            this.camera = new PuzzleEngineAlpha.Camera.Camera(Vector2.Zero, new Vector2(ResolutionHandler.WindowWidth, ResolutionHandler.WindowHeight), new Vector2(ResolutionHandler.WindowWidth, PuzzleEngineAlpha.Resolution.ResolutionHandler.WindowHeight));
            camera.Zoom = transition.Value;
            ResolutionHandler.Changed += ResetSizes;
        }