public void init(int score, int[] pos, GameLogic2048 logic) { currentPos = pos; currentScore = score; theText.text = currentScore.ToString(); setTextValues(); this.logic = logic; }
// Use this for initialization void Start() { gameLogic2048 = new GameLogic2048(); gameLogic2048.dispalyAction = (List <GameLogic2048.Cell> cells) => { Cells = new List <GameLogic2048.Cell>(); Cells.AddRange(cells.ToArray()); }; int newPointX = 0, newPointY = 0, newValue = 0; gameLogic2048.SpwanARandomNumber(ref newPointX, ref newPointY, ref newValue); gameLogic2048.SpwanARandomNumber(ref newPointX, ref newPointY, ref newValue); }