/// <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(); }
public LiveTwo(ObjectGroup.MapObject enemyobject) : base(enemyobject) { }
public ScoreTens(ObjectGroup.MapObject enemyobject) : base(enemyobject) { }
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; }
public Glider(ObjectGroup.MapObject enemyobject) : base(enemyobject) { rnd = new Random(); }
public MobileEnemy(ObjectGroup.MapObject enemyobject) : base(enemyobject) { animatedtype = "smallexplosion"; movespeed = 2.0f; }
//Boss does not move far on the X plane so pretty static public Boss(ObjectGroup.MapObject enemyobject) : base(enemyobject) { }
public Turret(ObjectGroup.MapObject enemyobject) : base(enemyobject) { }
public Intruder(ObjectGroup.MapObject enemyobject) : base(enemyobject) { }
//floater does not move far on the X plane, so static public Floater(ObjectGroup.MapObject enemyobject) : base(enemyobject) { }
public ScoreHundred(ObjectGroup.MapObject enemyobject) : base(enemyobject) { }