コード例 #1
0
ファイル: Barrel.cs プロジェクト: eri-cake/bomberman-2
 /// <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;
     }
 }
コード例 #2
0
ファイル: MainMenu.cs プロジェクト: eri-cake/bomberman-2
        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
        }
コード例 #3
0
ファイル: BonusSpeed.cs プロジェクト: eri-cake/bomberman-2
 public BonusSpeed(Map map, int x, int y, string textureFile)
     : base(map, x, y, textureFile) { }
コード例 #4
0
 public SimpleCreature(Map map, int x, int y, string textureFile)
     : base(map, x, y, textureFile) { }
コード例 #5
0
ファイル: Stone.cs プロジェクト: eri-cake/bomberman-2
 public Stone(Map map, int x, int y, string textureFile) : base(map, x, y, textureFile) { }
コード例 #6
0
ファイル: MapObject.cs プロジェクト: eri-cake/bomberman-2
 /// <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;
 }
コード例 #7
0
ファイル: MapObject.cs プロジェクト: eri-cake/bomberman-2
 /// <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);
 }
コード例 #8
0
ファイル: MapObject.cs プロジェクト: eri-cake/bomberman-2
 /// <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;
 }
コード例 #9
0
 public DestroyableObject(Map map, string textureFile) : base(map, textureFile) { }
コード例 #10
0
ファイル: Bomb.cs プロジェクト: eri-cake/bomberman-2
 public Bomb(Map map, Player owner, int x, int y, string textureFile)
     : base(map, x, y, textureFile)
 {
     this.owner = owner;
 }
コード例 #11
0
ファイル: Bomb.cs プロジェクト: eri-cake/bomberman-2
 public Bomb(Map map, Player owner, int x, int y)
     : base(map, x, y)
 {
     this.owner = owner;
 }
コード例 #12
0
 /// <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();
 }
コード例 #13
0
ファイル: Barrel.cs プロジェクト: eri-cake/bomberman-2
 /// <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) { }
コード例 #14
0
 public DestroyableObject(Map map, int x, int y) : base(map, x, y) { }
コード例 #15
0
ファイル: MapObject.cs プロジェクト: eri-cake/bomberman-2
        /// <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;
        }
コード例 #16
0
ファイル: Player.cs プロジェクト: eri-cake/bomberman-2
 public Player(Map map, int x, int y, string textureFile, int id) : base(map, x, y, textureFile) 
 {
     bombCollection = new Queue<Bomb>(bombsCount);
     Id = id;
 }
コード例 #17
0
 public DestroyableObject(Map map, int x, int y, string textureFile)
     : base(map, x, y, textureFile) { }