示例#1
0
文件: Gubbe.cs 项目: Jakob37/JDGAME
 //Konstruktor, som körs när gubben skapas
 public Gubbe(Game1 game, Sprite spriteSheet)
     : base(game, spriteSheet)
 {
     this.game = game;
     bild = spriteSheet.GetSubSprite(new Rectangle(25, 0, 15, 29));
     Setup();
     drawLayer = 0.5f;
 }
示例#2
0
 public LavaEnemy(Game1 game, Sprite spriteSheet)
     : base(game, spriteSheet)
 {
     bild = spriteSheet.GetSubSprite(new Rectangle(249, 5, 20, 20));
     hastighet = 1;
     movement = FiendeMovement.Follow;
     liv = 30;
     skada = 1;
 }
示例#3
0
 public FiendeTorn(Game1 game, Sprite spriteSheet)
     : base(game, spriteSheet)
 {
     bild = spriteSheet.GetSubSprite(new Rectangle(50, 0, 29, 29));
     hastighet = 0;
     movement = FiendeMovement.Follow;
     liv = 100;
     skada = 1;
     immobile = true;
 }
示例#4
0
文件: Mina.cs 项目: Jakob37/JDGAME
        public Mina(Game1 game, Sprite spriteSheet)
            : base(game, spriteSheet)
        {
            bild = spriteSheet.GetSubSprite(new Rectangle(85, 4, 27, 22));
            movement = FiendeMovement.Static;
            immobile = true;

            liv = 1;
            skada = 10;
        }
示例#5
0
 public StoneTowerBoss(Game1 game, Sprite spriteSheet)
     : base(game, spriteSheet)
 {
     bild = spriteSheet.GetSubSprite(new Rectangle(394,4,70,70));
     hastighet = 0;
     movement = FiendeMovement.Follow;
     liv = 2500;
     skada = 1;
     immobile = true;
 }
示例#6
0
 public StoneTower(Game1 game, Sprite spriteSheet)
     : base(game, spriteSheet)
 {
     bild = spriteSheet.GetSubSprite(new Rectangle(275, 7, 39, 39));
     hastighet = 0;
     movement = FiendeMovement.Static;
     liv = 200;
     skada = 1;
     immobile = true;
 }
        public StoneTowerBossStenBumling(Game1 game, Sprite spriteSheet, RunningState presentState)
            : base(game, spriteSheet)
        {
            this.game = game;
            this.spriteSheet = spriteSheet;

            bild = spriteSheet.GetSubSprite(new Rectangle(329, 36, 20, 20));
            Position = new Vector2(-100, -100);
            hastighet = 2;
            liv = 1;
            skada = 30;
        }
示例#8
0
        public BigEnemyStone(Game1 game, Sprite spriteSheet)
            : base(game, spriteSheet)
        {
            this.game = game;
            this.spriteSheet = spriteSheet;

            bild = spriteSheet.GetSubSprite(new Rectangle(324, 21, 13, 13));
            Position = new Vector2(-100, -100);
            hastighet = 3;
            liv = 1;
            skada = 20;
        }
        public StoneTowerBossSpawnSkott(Game1 game, Sprite spriteSheet)
            : base(game, spriteSheet)
        {
            this.game = game;
            this.spriteSheet = spriteSheet;

            bild = spriteSheet.GetSubSprite(new Rectangle(354, 42, 5, 5));
            Position = new Vector2(-100, -100);
            hastighet = 10;
            liv = 1;
            skada = 1;
        }
示例#10
0
        public VanligtFiendeSkott(Game1 game, Sprite spriteSheet, RunningState presentState)
            : base(game, spriteSheet)
        {
            this.game = game;
            this.spriteSheet = spriteSheet;

            bild = spriteSheet.GetSubSprite(new Rectangle(40, 5, 5, 5));
            Position = new Vector2(-100, -100);
            hastighet = 5;
            liv = 1;
            skada = 5;
        }
示例#11
0
        public LavaPool(Game1 game, Sprite spriteSheet)
            : base(game, spriteSheet)
        {
            this.game = game;
            this.spriteSheet = spriteSheet;

            bild = spriteSheet.GetSubSprite(new Rectangle(344, 3, 38, 35));
            Position = new Vector2(-100, -100);
            hastighet = 0;
            liv = 1000;
            skada = 1;
        }
示例#12
0
        public LavaSkott(Game1 game, Sprite spriteSheet)
            : base(game, spriteSheet)
        {
            this.game = game;
            this.spriteSheet = spriteSheet;

            bild = spriteSheet.GetSubSprite(new Rectangle(249, 28, 5, 5));
            Position = new Vector2(-100, -100);
            hastighet = 4;
            liv = 1;
            skada = 1;
        }
示例#13
0
        //Konstruktor. Anropas när ett skott skapas.
        public BasicSkott(Game1 game, Sprite spriteSheet)
            : base(game, spriteSheet)
        {
            this.game = game;
            this.spriteSheet = spriteSheet;

            bild = spriteSheet.GetSubSprite(new Rectangle(40,0,5,5));
            Position = new Vector2(-100, -100);
            hastighet = 5;
            liv = 1;
            skada = 10;
            energiKostnad = 2;
        }
        public StoneTowerBossSpawnedTower(Game1 game, Sprite spriteSheet)
            : base(game, spriteSheet)
        {
            this.game = game;
            this.spriteSheet = spriteSheet;

            bild = spriteSheet.GetSubSprite(new Rectangle(370, 48, 20, 20));
            Position = new Vector2(-100, -100);
            movement = FiendeMovement.Follow;
            hastighet = 0;
            liv = 100;
            skada = 1;
        }
示例#15
0
        public VanligFiende(Game1 game, Sprite spriteSheet)
            : base(game, spriteSheet)
        {
            bild = spriteSheet.GetSubSprite(new Rectangle(0, 0, 21, 25));
            hastighet = 2F;
            movement = FiendeMovement.Common;

            liv = 50;
            skada = 3;

            riktning = new Vector2((float)(random.NextDouble() * 2 - 1),
                (float)(random.NextDouble() * 2 - 1));
            riktning = GlobalFunctions.ScaleDirection(riktning);
        }
示例#16
0
        //Konstruktor. Anropas när ett skott skapas.
        public PowerSkott(Game1 game, Sprite spriteSheet)
            : base(game, spriteSheet)
        {
            this.game = game;
            this.spriteSheet = spriteSheet;

            bild = spriteSheet.GetSubSprite(new Rectangle(40, 10, 5, 5));
            Position = new Vector2(-100, -100);
            hastighet = 3;
            liv = 1;
            skada = 30;
            energiKostnad = 8;
            range = 400;
        }
示例#17
0
        public BasicLaser(Game1 game, Sprite spriteSheet)
            : base(game, spriteSheet)
        {
            this.game = game;
            this.spriteSheet = spriteSheet;

            bild = spriteSheet.GetSubSprite(new Rectangle(180, 0, 2, 14));
            Position = new Vector2(-100, -100);
            hastighet = 5;
            liv = 1;
            skada = 5F;
            energiKostnad = 2;
            range = 300;
        }
示例#18
0
        public MinFiende(Game1 game, Sprite spriteSheet)
            : base(game, spriteSheet)
        {
            bild = spriteSheet.GetSubSprite(new Rectangle(117, 0, 18, 27));
            hastighet = 1.5F;
            movement = FiendeMovement.Common;

            liv = 30;
            skada = 1;

            Random random = new Random();
            riktning = new Vector2((float)(random.NextDouble() * 2 - 1),
                (float)(random.NextDouble() * 2 - 1));
            riktning = GlobalFunctions.ScaleDirection(riktning);
        }
示例#19
0
        public BigStoneSkott(Game1 game, Sprite spriteSheet)
            : base(game, spriteSheet)
        {
            this.game = game;
            this.spriteSheet = spriteSheet;

            bild = spriteSheet.GetSubSprite(new Rectangle(324, 21, 13, 13));
            position = new Vector2(-100, -100);
            hastighet = 2;
            liv = 10000;
            skada = 100;
            energiKostnad = 50;
            range = 400;
            oneTimeDamageLista = new List<SpelObjekt>();
        }
示例#20
0
        public FirstBoss(Game1 game, Sprite spriteSheet)
            : base(game, spriteSheet)
        {
            //importera ny spriteSheet
            bild = spriteSheet.GetSubSprite(new Rectangle(142, 2, 32, 35));
            hastighet = 2f;
            movement = FiendeMovement.Follow;
            liv = 750;
            skada = 1;

            Random random = new Random();
            riktning = new Vector2((float)(random.NextDouble() * 2 - 1),
                (float)(random.NextDouble() * 2 - 1));
            riktning = GlobalFunctions.ScaleDirection(riktning);
        }
示例#21
0
        public FiendeMyra(Game1 game, Sprite spriteSheet)
            : base(game, spriteSheet)
        {
            bild = spriteSheet.GetSubSprite(new Rectangle(183, 0, 30, 46));

            hastighet = 6;
            movement = FiendeMovement.Common;

            liv = 1;
            skada = 10;

            riktning = new Vector2((float)(random.NextDouble() * 2 - 1),
                (float)(random.NextDouble() * 2 - 1));
            riktning = GlobalFunctions.ScaleDirection(riktning);

            center = new Vector2(bild.Width / 2, bild.Height / 2);
        }
示例#22
0
        public FiendeMyrEgg(Game1 game, Sprite spriteSheet)
            : base(game, spriteSheet)
        {
            bild = spriteSheet.GetSubSprite(new Rectangle(188, 52, 40, 40));

            hastighet = 0.1f;
            movement = FiendeMovement.Common;

            liv = 80;
            skada = 1;

            riktning = new Vector2((float)(random.NextDouble() * 2 - 1),
                (float)(random.NextDouble() * 2 - 1));
            riktning = GlobalFunctions.ScaleDirection(riktning);

            spawnCounter = 5000 + (int)(5000 * random.NextDouble());

            numberOfAnts = random.Next(5) + 5;
        }
示例#23
0
 public HowToPlayKnapp(Game1 game, Sprite spriteSheet, Vector2 position)
     : base(spriteSheet, position)
 {
     displaySprite = spriteSheet.GetSubSprite(new Rectangle(0, 130, 80, 40));
     this.game = game;
 }
示例#24
0
 public Level2Knapp(Game1 game, Sprite spriteSheet, Vector2 position, Level level)
     : base(game, spriteSheet, position, level)
 {
     displaySprite = spriteSheet.GetSubSprite(new Rectangle(80, 80, 50, 30));
 }
示例#25
0
 public ExitKnapp(Game1 game, Sprite spriteSheet, Vector2 position)
     : base(spriteSheet, position)
 {
     this.game = game;
     displaySprite = spriteSheet.GetSubSprite(new Rectangle(0, 90, 80, 40));
 }
示例#26
0
 public TestLevelKnapp(Game1 game, Sprite spriteSheet, Vector2 position, Level level)
     : base(game, spriteSheet, position, level)
 {
     displaySprite = spriteSheet.GetSubSprite(new Rectangle(80, 200, 50, 30));
     this.game = game;
 }