示例#1
0
    private void InitView()
    {
        GameObject roomGO = Instantiate(Resources.Load("Prefabs/Room")) as GameObject;

        room = roomGO.GetComponent <Room>();
        room.Init(roomSize);

        camera = Camera.main.GetComponent <RoomCamera>();
        camera.Init();
        camera.OnCameraRotate = HandleCameraRotate;
        camera.SetCameraTransform();

        GameObject gridGO = Instantiate(Resources.Load("Prefabs/GridGroup")) as GameObject;

        gridGroup = gridGO.GetComponent <GridGroup>();
        gridGroup.Init();

        // TODO
        isRestricted = true;
    }