public RandomBomber( IAudioEngine s, SceneBattle p, Bomber.BOMBERTYPE t, int interval, Point posi, Point range, Panel.COLOR union, int many) : base(s, p, posi.X, posi.Y) { this.union = union; this.interval = interval; this.posi = posi; this.range = range; this.many = many; while (this.positions.Count < many) { for (int index1 = 0; index1 <= range.X; ++index1) { for (int index2 = 0; index2 <= range.Y; ++index2) { this.positions.Add(new Point(posi.X + index1 * this.UnionRebirth, posi.Y + index2)); } } } this.positions = this.positions.OrderBy <Point, Guid>(i => Guid.NewGuid()).ToList <Point>(); this.type = t; this.animationpoint.Y = (int)this.type; }
public BomberWave( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int s, int panelchange, Bomber.BOMBERTYPE type, ChipBase.ELEMENT ele) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.type = type; this.panelchange = panelchange; this.nextmake = s; this.speed = 4; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.red) { this.positionDirect = new Vector2(this.position.X * 40 - 5, this.position.Y * 24 + 42); } else { this.positionDirect = new Vector2((this.position.X + 1) * 40 + 5, this.position.Y * 24 + 42); } this.frame = 0; if (this.parent.panel[this.position.X, this.position.Y].Hole) { this.flag = false; } else { this.sound.PlaySE(SoundEffect.shotwave); } switch (panelchange) { case 1: this.StandPanel.state = Panel.PANEL._sand; break; case 2: this.StandPanel.Crack(); break; } }
public Bomber(IAudioEngine s, SceneBattle p, int pX, int pY, Bomber.BOMBERTYPE t, int sp) : base(s, p, pX, pY) { this.speed = sp; this.positionDirect = new Vector2(pX * 40 + 20, pY * 24 + 70); this.type = t; if (this.type == Bomber.BOMBERTYPE.poison) { this.animationpoint.Y = 7; } else { this.animationpoint.Y = (int)this.type; } }
public Bomber(IAudioEngine s, SceneBattle p, Bomber.BOMBERTYPE t, Vector2 pd, int sp, Point posi) : base(s, p, posi.X, posi.Y) { this.speed = sp; this.positionDirect = pd; this.type = t; if (this.type == Bomber.BOMBERTYPE.poison) { this.animationpoint.Y = 7; } else { this.animationpoint.Y = (int)this.type; } }
public RandomBomber( IAudioEngine s, SceneBattle p, Bomber.BOMBERTYPE t, int interval, Panel.COLOR targetunion, Panel.COLOR union, int many) : base(s, p, 0, 0) { this.union = union; this.interval = interval; this.many = many; List <Point> pointList = new List <Point>(); for (int x = 0; x < this.parent.panel.GetLength(0); ++x) { for (int y = 0; y < this.parent.panel.GetLength(1); ++y) { if (this.parent.panel[x, y].color == targetunion && this.InAreaCheck(new Point(x, y))) { pointList.Add(new Point(x, y)); } } } while (this.positions.Count < many) { for (int index = 0; index < pointList.Count; ++index) { this.positions.Add(pointList[index]); } } this.positions = this.positions.OrderBy <Point, Guid>(i => Guid.NewGuid()).ToList <Point>(); this.type = t; this.animationpoint.Y = (int)this.type; }