/// <summary> /// Lässt bei dem Raumschiff eine Kugel erscheinen /// </summary> private void CreateSpaceShipBullet() { var y = _game.SpaceShipLocationY; var x = _game.SpaceShipLocationX + (_game.SpaceShipWidth / 2 - 5); _rectBullet = _graphicUtil.CreateRectangle(x, y, Width, Height); _graphicUtil.FillRectangle(_rectBullet, Color.Green); }
/// <summary> /// Erstellt ein Raumschiff /// </summary> public void Create() { _ship = new Rectangle[3]; int y = _game.ContainerHeight / 2; //- BlocHeight; int x = (_game.ContainerWidth / 2) - (BlocWidth * 3); _ship[0] = _graphicUtil.CreateRectangle(x, y, BlocWidth * 7, BlocHeight * 2); _ship[1] = _graphicUtil.CreateRectangle(_ship[0].X + (BlocWidth * 2), _ship[0].Y - BlocHeight, BlocWidth * 3, BlocHeight); _ship[2] = _graphicUtil.CreateRectangle(_ship[1].X + BlocWidth, _ship[1].Y - BlocHeight, BlocWidth, BlocHeight); _graphicUtil.FillRectangles(_ship, Color.Green); }
private void CreateShip() { int BlocWidth = 15; int BlocHeight = 15; int y = _game.ContainerHeight - BlocHeight * 4; int x = (_game.ContainerWidth / 2) - (BlocWidth * 3); _ship[0] = _graphicUtil.CreateRectangle(x, y, BlocWidth * 7, BlocHeight * 2); _ship[1] = _graphicUtil.CreateRectangle(_ship[0].X + (BlocWidth * 2), _ship[0].Y - BlocHeight, BlocWidth * 3, BlocHeight); _ship[2] = _graphicUtil.CreateRectangle(_ship[1].X + BlocWidth, _ship[1].Y - BlocHeight, BlocWidth, BlocHeight); _graphicUtil.FillRectangles(_ship, Color.Green); }
/// <summary> /// Erstellt ein Item, am oberen Formrand an einer Zufälligen X-Koordinate /// </summary> private void Cretate() { Destoryed = false; X = RandomUtil.Generate(0, _game.ContainerWidth); if (_rectItem.IsEmpty) { _rectItem = _graphicUtil.CreateRectangle(X, Y, Width, Height); } _rectItem.Y = Y; _rectItem.X = X; _intervalTimer.Restart(); _interval = GenerateInterval(); _graphicUtil.FillRectangle(_rectItem, _itemColor); }
/// <summary> /// Erstellt einen Stein /// </summary> public void Create(int x, int y) { _recRock = _graphicUtil.CreateRectangle(x, y, Width, Hight); _graphicUtil.FillRectangle(_recRock, _color); }
private void CreateMid() { _invader = new Rectangle[12]; var blocWidth = Width * 2; var blocHeight = Height * 5; _invader[0] = _graphicUtil.CreateRectangle(X, Y, blocWidth, blocHeight); _graphicUtil.FillRectangle(_invader[0], Color.Red); CreateLeftEye(); }
/// <summary> /// Erstellt die Mitte des Invaders /// </summary> private void CreateMid() { _invader = new Rectangle[13]; const int blocWidth = BlocWidth * 2; const int blocHeight = BlocHeight * 5; _invader[0] = _graphicUtil.CreateRectangle(X, Y, blocWidth, blocHeight); _graphicUtil.FillRectangle(_invader[0], _color); }