Ejemplo n.º 1
0
    public static void ExitGameSave3x3(GameManager3x3 gameManager3x3)
    {
        BinaryFormatter formatter = new BinaryFormatter();
        string          path      = Application.persistentDataPath + "/Exit3x3.data";
        FileStream      stream    = new FileStream(path, FileMode.Create);

        ExitData3x3 data = new ExitData3x3(gameManager3x3);

        formatter.Serialize(stream, data);
        stream.Close();
    }
Ejemplo n.º 2
0
    public static void Save3x3Game2(GameManager3x3 gameManager3x3)
    {
        BinaryFormatter formatter = new BinaryFormatter();
        string          path      = Application.persistentDataPath + "/Game2_3x3.data";
        FileStream      stream    = new FileStream(path, FileMode.Create);

        Saved3x3Data2 data = new Saved3x3Data2(gameManager3x3);

        formatter.Serialize(stream, data);
        stream.Close();
    }
Ejemplo n.º 3
0
    public ExitData3x3(GameManager3x3 gameManager3x3)
    {
        xS = gameManager3x3.x;
        yS = gameManager3x3.y;

        for (xS = 0; xS <= 2; xS++)
        {
            for (yS = 0; yS <= 2; yS++)
            {
                if (gameManager3x3.Grid[xS, yS] != null)
                {
                    exitTileNumber.Add(gameManager3x3.Grid[xS, yS].GetComponent <Tiles>().Number);
                    exitX.Add(xS);
                    exitY.Add(yS);
                }
            }
        }
        exitScore = gameManager3x3.theScore;
    }
Ejemplo n.º 4
0
    public Saved3x3Data2(GameManager3x3 gameManager3x3)
    {
        xS = gameManager3x3.x;
        yS = gameManager3x3.y;

        for (xS = 0; xS <= 2; xS++)
        {
            for (yS = 0; yS <= 2; yS++)
            {
                if (gameManager3x3.Grid[xS, yS] != null)
                {
                    tileNumber2.Add(gameManager3x3.Grid[xS, yS].GetComponent <Tiles>().Number);
                    posX2.Add(xS);
                    posY2.Add(yS);
                }
            }
        }
        score2 = gameManager3x3.theScore;
    }