/// <summary> /// Setzt alles zurück /// </summary> public void reset() { this.NextFallingTeil = new TTeil(); this.NextFallingTeil.randomize(this._MyRandom); this.NextFallingTeil.move(0, TTeil.MaxHoehe); this.FallingTeil = new TTeil(); this.FallingTeil.randomize(this._MyRandom); this.FallingTeil.move(0, TArena.AnzahlSchichten - 1); this.NextFallingColor = TTeil.createRandomColor(this._MyRandom); this.FallingColor = TTeil.createRandomColor(this._MyRandom); }
/// <summary> /// Das fallende Teil wird zufällig zu einem neuen /// Teil und an die Startposition gesetzt /// </summary> public void startNewFallingTeil() { this.NextFallingTeil.copyTo(this.FallingTeil); this.NextFallingTeil.Clear(); this.NextFallingTeil.randomize(this._MyRandom); this.NextFallingTeil.move(0, TTeil.MaxHoehe); this.FallingTeil.move(0, TArena.AnzahlSchichten - 1); this.FallingColor = this.NextFallingColor; this.NextFallingColor = TTeil.createRandomColor(this._MyRandom); if (this.OnDataChanged != null) { this.OnDataChanged(); } }