示例#1
0
    public void GameInit()
    {
        GridCamera.RaycastOn();
        GridGenerator.instance.Clear();
        GridGenerator.instance.GenerateHex(tile, Vector3.zero, 10, 10);

        List <GameObject> list = new List <GameObject> ();

        GameObject s1 = GridGenerator.instance.Fetch(3, 3);

        s1.GetComponent <SbModel>().SelectArea();
        GameObject s2 = GridGenerator.instance.Fetch(6, 4);

        s2.GetComponent <SbModel>().SelectCone();
        GameObject s3 = GridGenerator.instance.Fetch(7, 1);

        s3.GetComponent <SbModel>().SelectLine();
    }
示例#2
0
    public void GameInit()
    {
        GridCamera.RaycastOn();

        turn   = 0;
        player = Player.Player1;
        state  = GameState.Playing;
        board  = new List <TttModel>();
        GridGenerator.instance.Clear();
        GridGenerator.instance.Generate(tile, Vector3.zero, 3, 3);

        int index = 0;

        foreach (GameObject go in GridGenerator.instance.tiles)
        {
            TttModel tm = go.GetComponent <TttModel>() as TttModel;
            tm.index = index;
            board.Add(tm);
            index++;
        }
    }