Exemplo n.º 1
0
 public void init(int score, int[] pos, GameLogic2048 logic)
 {
     currentPos   = pos;
     currentScore = score;
     theText.text = currentScore.ToString();
     setTextValues();
     this.logic = logic;
 }
Exemplo n.º 2
0
    // 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);
    }