/// <summary> /// Create an instance of barrel with a particular bonus hidden inside /// </summary> /// <param name="map">Map where this component will be placed</param> /// <param name="x">X-coordinate of the map position</param> /// <param name="y">Y-coordinate of the map position</param> /// <param name="textureFile">Path to the file where barrel texture is stored</param> /// <param name="type">Type of the bonus hidden inside the barrel</param> public Barrel(Map map, int x, int y, string textureFile, BonusType type) : this(map, x, y, textureFile) { //BonusType = type; switch (type) { case BonusType.Bomb: bonus = new BonusBomb(map, MapX, MapY, "Images/bonusBomb1"); break; case BonusType.Fire: bonus = new BonusFire(map, MapX, MapY, "Images/bonusFire1"); break; case BonusType.Speed: bonus = new BonusSpeed(map, MapX, MapY, "Images/bonusSpeed1"); break; } }
private void startRound() { rounds--; Map map = new Map(Game, spriteBatch, this, players, "map1.dat"); map.DrawOrder = 1; Rectangle rec = GraphicsDevice.DisplayMode.TitleSafeArea; rec.Height -= (int)MapObject.Size * 3; map.Area = rec; // set panel area each time round is started - size of map could change bottomPanel.Area = new Rectangle(rec.X, (int)(map.Height * MapObject.Size), (int)(map.Width * MapObject.Size), (int)MapObject.Size); Game.Components.Add(map); NextScreen(map); // switch to map screen }
public BonusSpeed(Map map, int x, int y, string textureFile) : base(map, x, y, textureFile) { }
public SimpleCreature(Map map, int x, int y, string textureFile) : base(map, x, y, textureFile) { }
public Stone(Map map, int x, int y, string textureFile) : base(map, x, y, textureFile) { }
/// <summary> /// Base constructor of all map objects /// </summary> /// <param name="map">Map where this component will be placed</param> /// <param name="x">X-coordinate of the map position</param> /// <param name="y">Y-coordinate of the map position</param> /// <param name="textureFile">Path to the file where texture for this object is stored</param> public MapObject(Map map, int x, int y, string textureFile) : this(map, textureFile) { this.map = map; this.Position = new Vector2(x * Size, y * Size); this.textureFile = textureFile; }
/// <summary> /// Base constructor of all map objects /// </summary> /// <param name="map">Map where this component will be placed</param> /// <param name="x">X-coordinate of the map position</param> /// <param name="y">Y-coordinate of the map position</param> public MapObject(Map map, int x, int y) : this(map) { this.Position = new Vector2(x * Size, y * Size); }
/// <summary> /// Base constructor of all map objects /// </summary> /// <param name="map">Map where this component will be placed</param> /// <param name="textureFile">Path to the file where texture for this object is stored</param> public MapObject(Map map, string textureFile) : this(map) { this.textureFile = textureFile; }
public DestroyableObject(Map map, string textureFile) : base(map, textureFile) { }
public Bomb(Map map, Player owner, int x, int y, string textureFile) : base(map, x, y, textureFile) { this.owner = owner; }
public Bomb(Map map, Player owner, int x, int y) : base(map, x, y) { this.owner = owner; }
/// <summary> /// Create an instance of particle system /// </summary> /// <param name="map">Map where this component will be placed</param> /// <param name="textureFile">Path to the file where texture for this particle system is stored</param> public ParticleSystem(Map map, string textureFile) : base(map, textureFile) { particles = new List<ParticleData>(); generator = new Random(); }
/// <summary> /// Create an instance of barrel without any bonus inside /// </summary> /// <param name="map">Map where this component will be placed</param> /// <param name="x">X-coordinate of the map position</param> /// <param name="y">Y-coordinate of the map position</param> /// <param name="textureFile">Path to the file where barrel texture is stored</param> public Barrel(Map map, int x, int y, string textureFile) : base(map, x, y, textureFile) { }
public DestroyableObject(Map map, int x, int y) : base(map, x, y) { }
/// <summary> /// This constructor always must be called. Default values of the properties are set here. /// </summary> /// <param name="map">Map where this component will be placed</param> private MapObject(Map map) { Width = Size; Height = Size; IsPassable = false; this.map = map; }
public Player(Map map, int x, int y, string textureFile, int id) : base(map, x, y, textureFile) { bombCollection = new Queue<Bomb>(bombsCount); Id = id; }
public DestroyableObject(Map map, int x, int y, string textureFile) : base(map, x, y, textureFile) { }