public Game() { thread = new Thread(Action); thread.IsBackground = true; level = new Level(1, 10); glass = new Glass(10, 20); glass.LinesRemoved += glass_LinesRemoved; defPosition = new XY(4, 19); gameOver = false; }
public bool PlaceToGlass(Glass glass, XY location) { if (this.glass != null) { Hide(); } this.glass = glass; this.location = location; if (glass.ThereBrick(GetPosition())) { return(false); } Show(); return(true); }
/// <summary> /// init all objects /// </summary> public void Start() { RootGameObject = GameObject.Find("Root"); tetris = RootGameObject.GetComponent <Tetris>(); glass = new Glass(Mode); checker = new Checker(glass); DoInit = true; figures = new Figures(Mode); NewFigure = true; userInput = new UserInput(); DoUpdate = false; GameOver = false; }
/// <summary> /// constructor to recieve glass size and content /// </summary> /// <param name="glass"></param> public Checker(Glass glass) { this.Width = glass.Width; this.Height = glass.Height; this.Board = glass.Board; }