private bool _selected; //I guess as in "currently doing something" #endregion Fields #region Constructors public SmallEnemy(ref List<SmallEnemy> swarm) : base() { if (Texture == null) LoadContent(); this.Swarm = swarm; Transform.World.Origin = new Vector2(20, 16); this.Color = Color.White; var rc = new SpriteRenderer(this) { Texture = Texture, Color = Color.White }; AddComponent(rc); var cc = new Collision(this, 32, 32); cc.Solid = true; AddComponent(cc); var pfc = new PathFinder(this); AddComponent(pfc); var stat = new Component.Stat(this) { Life = 50, Defence = 25, Strength = 70, GetAim = 100, GetDodge = 50 }; AddComponent(stat); }
private bool _selected = false; //I guess as in "currently doing something" #endregion Fields #region Constructors public Shot(Stat _soldierStat, string _type) : base() { type = _type; if (Texture == null) LoadContent(); //Transform.World.Origin = new Vector2(16, 16); Stat = _soldierStat; if (type == "Rocket") { Stat.Strength = 50000; } this.Color = Color.White; var rc = new SpriteRenderer(this) { Texture = Texture, Color = Color.White }; rc.Offset = new Vector2(16, 16); AddComponent(rc); var cc = new Collision(this, 32, 32); AddComponent(cc); }
public Soldier(ref List<Soldier> squad) : base() { if (Texture == null) LoadContent(); this.Squad = squad; Transform.World.Origin = new Vector2(16, 16); this.Color = Color.White; var rc = new SpriteRenderer(this) {Texture = Texture, Color = Color.White}; AddComponent(rc); var cc = new Collision(this, 32, 32); AddComponent(cc); var pfc = new PathFinder(this); AddComponent(pfc); var flashlight = new Flashlight(this) { Intensity = 0.8f }; AddComponent(flashlight); var stat = new Component.Stat(this) { MaxHP = 100, MaxPanic = 100, Life = 100, Defence = 25, Strength = 50, GetAim = 40, GetDodge = 20 }; AddComponent(stat); }
public Door(bool horizontal) : base() { LoadContent(); IsOpen = false; if (horizontal) Transform.World.Rotation = -MathHelper.PiOver2; var rc = new SpriteRenderer(this) { Texture = Texture, Color = Color.White }; if (horizontal) rc.Offset.Y += Texture.Width; AddComponent(rc); Collision cc; if (horizontal) cc = new Collision(this, Texture.Height, Texture.Width); else cc = new Collision(this, Texture.Width, Texture.Height); cc.Solid = true; AddComponent(cc); }