Пример #1
0
 public HealthSprite(Texture2D texture, Vector2 pos, Point frameDims, int collisionOffset,
     int frameDelay, Vector2 speed, float layerDepth, SpriteManager manager)
     : base(texture, pos, frameDims, collisionOffset, frameDelay, speed, layerDepth, manager)
 {
     MaxHealth = 100;
     Heal();
 }
 public BackgroundSprite(Texture2D texture, Point frameDims, Sprite actor, SpriteManager manager)
     : base(texture, new Vector2(0,0), frameDims, 0, 1, actor.Speed * SPEED_FACTOR, 1, manager)
 {
     this.CanCollide = false;
     this.actor = actor;
     this.Physics.AddComponent(new MovePhysicsComponent());
 }
Пример #3
0
 public ZombieSprite(Texture2D texture, Vector2 pos, Point frameDims, int collisionOffset,
     int frameDelay, Vector2 speed, float layerDepth, SpriteManager manager)
     : base(texture, pos, frameDims, collisionOffset, frameDelay, speed, layerDepth, manager)
 {
     this.Physics.AddComponent(new GravityPhysicsComponent());
     this.Physics.AddComponent(new MovePhysicsComponent());
     this.KillXp = 100;
 }
 public ProjectileSprite(Sprite owner, Texture2D texture, Vector2 pos, Point frameDims, int collisionOffset
     , int frameDelay, Vector2 speed, float layerDepth, int range, SpriteManager manager)
     : base(texture, pos, frameDims, collisionOffset, frameDelay, speed, layerDepth, manager)
 {
     this.owner = owner;
     this.Animated = false;
     this.Physics.AddComponent(new MovePhysicsComponent());
     this.range = range;
     this.startPos = pos;
     this.BaseDamage = 10;
 }
        public UserControlledSprite(Texture2D texture, Texture2D bulletTexture, Vector2 pos, Point frameDims, int collisionOffset
            , int frameDelay, Vector2 speed, float layerDepth, SpriteManager manager)
            : base(texture, pos, frameDims, collisionOffset, frameDelay, speed, layerDepth, manager)
        {
            this.Physics.AddComponent(new GravityPhysicsComponent());
            this.Physics.AddComponent(new MovePhysicsComponent());

            this.Physics.AddComponent(new JumpingPhysicsComponent());
            this.bulletTexture = bulletTexture;

            this.TimedEffects.AddEffect("Blink", new BlinkEffect(3000, 100, 1, 255, this));
            this.Upgrades = new Upgrades();
        }
Пример #6
0
        public Sprite(Texture2D texture, Vector2 pos, Point frameDims, int collisionOffset,
            int frameDelay, Vector2 speed, float layerDepth, SpriteManager manager)
        {
            this.CanCollide = true;
            this.TextureImage = texture;
            this.Position = pos;
            this.StartPosition = pos;
            this.FrameDims = frameDims;
            this.CollisionOffset = collisionOffset;
            this.Alpha = 255;

            this.Animation = new SpriteAnimation(this,frameDelay);
            this.Speed = speed;
            this.LayerDepth = layerDepth;
            this.Physics = new SpritePhysics(this);
            this.Animated = true;
            this.Blocking = false;
            this.Manager = manager;
            this.TimedEffects = new TimedEffects.TimedEffects();
        }
Пример #7
0
 public LevelManager(SpriteManager manager)
 {
     this.levels = new List<Level>();
     this.levels.Add(new Level("TestLevel", this));
     this.SpriteManager = manager;
 }
 public ZombieColaSprite(Texture2D texture, Vector2 pos, SpriteManager manager)
     : base(texture, pos, new Point(21, 40), 0, 100, Vector2.Zero, 0, manager)
 {
 }
 public HealthPackSprite(Texture2D texture, Vector2 pos, SpriteManager manager)
     : base(texture, pos, new Point(30, 20), 0, 100, Vector2.Zero, 0, manager)
 {
 }
Пример #10
0
 public PlatformSprite(Texture2D texture, Vector2 pos, Point frameDims, int collisionOffset, int frameDelay, Vector2 speed, SpriteManager manager)
     : base(texture, pos, frameDims, collisionOffset, frameDelay, speed, 0.9f, manager)
 {
     this.Blocking = true;
 }