コード例 #1
0
ファイル: CUpgrade.cs プロジェクト: knotho/BreakoutOOP
 public CUpgrade(Point _posi, Graphics _gfx, frmSpiel _parent, int _type)
 {
     posi = _posi;
     groesse = new Size(10, 10);
     rect = new Rectangle(posi, groesse);
     farbe = Color.Red; // Rot als default
     gfx = _gfx;
     parent = _parent;
     type = _type;
     if (type == 0)
     {
         farbe = Color.Red;
         modLaenge = 45;
         modPoints = 0;
         upgradeText = "+Länge";
     }
     else if (type == 1)
     {
         farbe = Color.LimeGreen;
         modLaenge = 0;
         modPoints = 5;
         upgradeText = "+5";
     }
     else
     {
         farbe = Color.Gold;
         modLaenge = 0;
         modPoints = 10;
         upgradeText = "+10";
     }
     isAlive = true;
 }
コード例 #2
0
 public frmHighscoreEingabe(int _points, int _pos, frmSpiel _parent)
 {
     InitializeComponent();
     lblPkte.Text = _points.ToString();
     points = _points;
     lblPos.Text = _pos.ToString();
     pos = _pos;
     parent = _parent;
 }
コード例 #3
0
ファイル: CScrollingText.cs プロジェクト: knotho/BreakoutOOP
 public CScrollingText(Graphics _gfx, frmSpiel _parent, string text, int richtung, Point _posi)
 {
     gfx = _gfx;
     parent = _parent;
     yAdd = 0;
     zaehler = 0;
     isAlive = false;
     spawnScrollingText(text, richtung, _posi);
 }
コード例 #4
0
ファイル: CStein.cs プロジェクト: knotho/BreakoutOOP
 public CStein(Point _posi, Color _farbe, Graphics _gfx, frmSpiel _parent)
 {
     isAlive = true;
     posi = _posi;
     farbe = _farbe;
     gfx = _gfx;
     parent = _parent;
     groesse = new Size(100, 20);
     rect = new RectangleF(posi, groesse);
     Draw();
 }
コード例 #5
0
ファイル: CSchlaeger.cs プロジェクト: knotho/BreakoutOOP
 public CSchlaeger(Point _posi, int _richtung, Keys _links, Keys _rechts, Graphics _gfx, Panel _feld, frmSpiel _parent)
 {
     posi = _posi;
     rect = new Rectangle(posi, groesse);
     richtung = _richtung;
     links = _links;
     rechts = _rechts;
     gfx = _gfx;
     feld = _feld;
     parent = _parent;
     upgraded = false;
     Draw();
 }
コード例 #6
0
ファイル: CBall.cs プロジェクト: knotho/BreakoutOOP
 public CBall(PointF _posi, Graphics _gfx, frmSpiel _parent)
 {
     posi = _posi;
     Random rnd = new Random();
     int randZahl = rnd.Next(2);
     if (randZahl == 0)
     {
         richtung = new Point(1, -1);
     } else
     {
         richtung = new Point(-1, -1);
     }
     groesse = new Size(10, 10);
     hitbox = new RectangleF(posi, groesse);
     gfx = _gfx;
     parent = _parent;
     isAlive = true;
     hasHit = false;
     speedFac = 5;
     points = 0;
     Draw();
 }
コード例 #7
0
ファイル: CLevelReader.cs プロジェクト: knotho/BreakoutOOP
 public CLevelReader(Graphics _gfx, frmSpiel _parent)
 {
     gfx = _gfx;
     parent = _parent;
 }