예제 #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;
 }
예제 #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;
 }
예제 #3
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>();
 }
예제 #4
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;
 }
예제 #5
0
 public Player(Handlers.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();
     this.actorManager     = actorManager;
     this.IsActive         = false;
     tranparencyTransition = new PuzzleEngineAlpha.Animations.SmoothTransition(1.0f, 0.001f, 0.6f, 1.0f);
     IsActive       = false;
     Interaction    = false;
     movementState  = 0;
     applyJumpForce = false;
 }
예제 #6
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();
        }
예제 #7
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;
 }
예제 #8
0
 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>();
 }
예제 #9
0
 public Chaser(Handlers.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.TileMap         = tileMap;
     this.animations.Add("run", new PuzzleEngineAlpha.Animations.AnimationStrip(content.Load <Texture2D>(@"Textures/Mobs/chaser"), frameWidth, "run"));
     currentAnimation  = "run";
     this.actorManager = actorManager;
     AI = new AStarPlatformer(this.TileMap);
     timeSinceTargetSquare = 0.0f;
     Lives = 2;
     step  = 25.0f;
 }