示例#1
0
        /// <summary>
        /// Big constructor to load all the parameters from ObjectGroup.MapObject
        /// </summary>
        /// <param name="objectparameters"></param>
        public GameGadgets(ObjectGroup.MapObject objectparameters)
        {
            dead = false;
            dying = false;
            positionx = objectparameters.x;
            positiony = objectparameters.y;
            deathvector = Vector2.Zero;
            velocity = Vector2.Zero;
            //Parmeters drom Tiled xml
            var match = objectparameters.GetProperties.ListOfProperties.Find(x => x.name == "numFrames");
            if (match != null)
                numframesX = Convert.ToInt32(match.value);
            match = objectparameters.GetProperties.ListOfProperties.Find(x => x.name == "source");
            if (match != null)
                image = new Image(match.value);
            match = objectparameters.GetProperties.ListOfProperties.Find(x => x.name == "Height");
            if ((match != null) && (image != null))
                image.height = Convert.ToInt32(match.value);
            match = objectparameters.GetProperties.ListOfProperties.Find(x => x.name == "Width");
            if ((match != null) && (image != null))
                image.width = Convert.ToInt32(match.value);

            LoadContent();
        }
示例#2
0
        public LiveTwo(ObjectGroup.MapObject enemyobject) : base(enemyobject)
        {

        }
示例#3
0
 public ScoreTens(ObjectGroup.MapObject enemyobject) : base(enemyobject)
 {
     
 }
示例#4
0
 public StaticEnemy(ObjectGroup.MapObject enemyobject) : base(enemyobject)
 {
     animatedtype = "smallexplosion";
     ///No move speed for static enemies
     movespeed = 1.0f;//Movespeed is used to set velocity X
 }
 public StationaryGameGadget(ObjectGroup.MapObject enemyobject)
     : base(enemyobject)
 {
     scorevalue = 0;
 }
示例#6
0
 public Glider(ObjectGroup.MapObject enemyobject)
     : base(enemyobject)
 {
     rnd = new Random();
 }
示例#7
0
 public MobileEnemy(ObjectGroup.MapObject enemyobject)
     : base(enemyobject)
 {
     animatedtype = "smallexplosion";
     movespeed = 2.0f;
 }
示例#8
0
 //Boss does not move far on the X plane so pretty static
 public Boss(ObjectGroup.MapObject enemyobject)
     : base(enemyobject)
 {
 }
示例#9
0
 public Turret(ObjectGroup.MapObject enemyobject) : base(enemyobject)
 {
 }
示例#10
0
 public Intruder(ObjectGroup.MapObject enemyobject) : base(enemyobject)
 {
 }
示例#11
0
 //floater does not move far on the X plane, so static
 public Floater(ObjectGroup.MapObject enemyobject) : base(enemyobject)
 {
 }
示例#12
0
        public ScoreHundred(ObjectGroup.MapObject enemyobject) : base(enemyobject)
        {

        }