示例#1
0
        public List <PuzzleGroup> BuildTestPuzzleGroupData()
        {
            var puzzles      = new List <PuzzleGroup>();
            var sciencegroup = new PuzzleGroup {
                Name = "Science", Puzzles = new List <PuzzleSubGroup>()
            };

            sciencegroup.Puzzles.Add(PuzzleBuilder("Human Skeleton Puzzles"));
            sciencegroup.Puzzles.Add(PuzzleBuilder("Resperatory System"));
            sciencegroup.Puzzles.Add(PuzzleBuilder("Muscle System"));

            puzzles.Add(sciencegroup);

            var englishgroup = new PuzzleGroup {
                Name = "English", Puzzles = new List <PuzzleSubGroup>()
            };

            englishgroup.Puzzles.Add(PuzzleBuilder("English Vocabs Puzzles"));
            englishgroup.Puzzles.Add(PuzzleBuilder("Grammer"));
            puzzles.Add(englishgroup);

            var geographygroup = new PuzzleGroup {
                Name = "Geography", Puzzles = new List <PuzzleSubGroup>()
            };

            geographygroup.Puzzles.Add(PuzzleBuilder("Rivers Puzzles"));
            geographygroup.Puzzles.Add(PuzzleBuilder("Tectonic Plates Puzzles"));
            geographygroup.Puzzles.Add(PuzzleBuilder("Polution Puzzles"));
            geographygroup.Puzzles.Add(PuzzleBuilder("Volcanoes Puzzles"));
            puzzles.Add(geographygroup);
            return(puzzles);
        }
示例#2
0
    void Start()
    {
        int i;

        instance     = this;
        window       = Camera.main.transform;
        menu         = FindObjectOfType <Menu>();
        rider        = FindObjectOfType <Rider>();
        riders       = FindObjectsOfType <Rider>();
        graphics     = FindObjectOfType <Graphics>();
        puzzleGroups = FindObjectsOfType <PuzzleGroup>();

        puzzleGroupIndex = 0;
        Array.Sort(puzzleGroups, new PuzzleGroupSorter());
        puzzleGroup = puzzleGroups[puzzleGroupIndex];
        puzzle      = puzzleGroup.puzzles[puzzleGroup.puzzleIndex];
        for (i = 0; i < puzzleGroups.Length; i++)
        {
            puzzleGroups[i].gameObject.SetActive(false);
        }
        puzzleGroup.gameObject.SetActive(true);
        puzzle.Activate();

        switch (Application.platform)
        {
        case RuntimePlatform.WindowsPlayer:
            break;

        case RuntimePlatform.OSXPlayer:
            break;

        case RuntimePlatform.LinuxPlayer:
            break;
        }

        if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer)
        {
            mobile             = true;
            menu.touchKeyboard = TouchScreenKeyboard.Open(graph.string1, TouchScreenKeyboardType.NumberPad, false);
            menu.showKeypad    = true;
        }
        else
        {
            mobile = false;
        }

        if (Application.isWebPlayer)
        {
            Application.ExternalEval(String.Format("u.getUnity().SendMessage(\"{0}\", \"OnQueryString\", window.location.search);", gameObject.name));
        }
        else if (Application.isEditor)
        {
            OnQueryString(startUrl);
        }

        Application.targetFrameRate = 60;
    }
示例#3
0
    public void SetGroup(int groupIndex)
    {
        puzzle.Deactivate();
        puzzleGroup.gameObject.SetActive(false);
        puzzleGroupIndex = groupIndex;
        puzzleGroup      = puzzleGroups[puzzleGroupIndex];
        puzzleGroup.gameObject.SetActive(true);
        puzzle      = puzzleGroup.puzzle;
        puzzleIndex = puzzleGroup.puzzleIndex;
        puzzle.Activate();

        graph.string1 = puzzle.string1;
        cameraSmooth  = false;
        StopRiding();
    }
示例#4
0
        public IObservable <List <PuzzleGroup> > GetPuzzles()
        {
            var puzzles      = new List <PuzzleGroup>();
            var sciencegroup = new PuzzleGroup {
                Name = "Science", Puzzles = new List <PuzzleSubGroup>()
            };

            sciencegroup.Puzzles.Add(PuzzleBuilder("Human Skeleton Puzzles"));
            sciencegroup.Puzzles.Add(PuzzleBuilder("Resperatory System"));
            sciencegroup.Puzzles.Add(PuzzleBuilder("Muscle System"));

            puzzles.Add(sciencegroup);

            var englishgroup = new PuzzleGroup {
                Name = "English", Puzzles = new List <PuzzleSubGroup>()
            };

            englishgroup.Puzzles.Add(PuzzleBuilder("English Vocabs Puzzles"));
            englishgroup.Puzzles.Add(PuzzleBuilder("Grammer"));
            puzzles.Add(englishgroup);

            var geographygroup = new PuzzleGroup {
                Name = "Geography", Puzzles = new List <PuzzleSubGroup>()
            };

            geographygroup.Puzzles.Add(PuzzleBuilder("Rivers Puzzles"));
            geographygroup.Puzzles.Add(PuzzleBuilder("Tectonic Plates Puzzles"));
            geographygroup.Puzzles.Add(PuzzleBuilder("Polution Puzzles"));
            geographygroup.Puzzles.Add(PuzzleBuilder("Volcanoes Puzzles"));
            puzzles.Add(geographygroup);

            IObservable <List <PuzzleGroup> > observable = Observable.Create <List <PuzzleGroup> >(o =>
            {
                o.OnNext(puzzles);
                o.OnCompleted();
                return(() => {}
                       );
            });

            return(observable);
        }
        private HomePageViewModel GetHomePageViewModel()
        {
            var puzzles      = new List <PuzzleGroup>();
            var sciencegroup = new PuzzleGroup {
                Name = "Science", Puzzles = new List <PuzzleSubGroup>()
            };

            sciencegroup.Puzzles.Add(PuzzleBuilder("Human Skeleton Puzzles"));
            sciencegroup.Puzzles.Add(PuzzleBuilder("Resperatory System"));
            sciencegroup.Puzzles.Add(PuzzleBuilder("Muscle System"));

            puzzles.Add(sciencegroup);

            var englishgroup = new PuzzleGroup {
                Name = "English", Puzzles = new List <PuzzleSubGroup>()
            };

            englishgroup.Puzzles.Add(PuzzleBuilder("English Vocabs Puzzles"));
            englishgroup.Puzzles.Add(PuzzleBuilder("Grammer"));
            puzzles.Add(englishgroup);

            var geographygroup = new PuzzleGroup {
                Name = "Geography", Puzzles = new List <PuzzleSubGroup>()
            };

            geographygroup.Puzzles.Add(PuzzleBuilder("Rivers Puzzles"));
            geographygroup.Puzzles.Add(PuzzleBuilder("Tectonic Plates Puzzles"));
            geographygroup.Puzzles.Add(PuzzleBuilder("Polution Puzzles"));
            geographygroup.Puzzles.Add(PuzzleBuilder("Volcanoes Puzzles"));
            puzzles.Add(geographygroup);
            var homePageViewModel = new HomePageViewModel {
                CurrentUser = "******", PuzzleGroups = puzzles
            };

            return(homePageViewModel);
        }