예제 #1
0
 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
 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
 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
 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
 public CLevelReader(Graphics _gfx, frmSpiel _parent)
 {
     gfx = _gfx;
     parent = _parent;
 }