Beispiel #1
0
        public IEnumerator startStoryline()
        {
            yield return new WaitForSeconds(0.005f);

            ui_Manager = FindObjectOfType<UI_Manager>();
            floorManager = GameObject.Find("FloorManager");

            //Storyline demo = new Storyline(0, 1, "Demo Storyline", "Let's see how good is your mobile app!");

            mc = FindObjectOfType<MapController>();

            map = mc.getMap();

            iBeaconHandler bh = iBeaconHandler.GetComponent<iBeaconHandler>();
            List<Beacon> beacons = bh.getBeacons();
            int slID = PlayerPrefs.GetInt("storylineID");

            DisplayFloor(2); //this should be the first floor

            map.initializeLists(arrayOfNodes);

            print("Storyline id is: " + slID);
            map.GetStoryline(slID).setBeaconList(beacons);

            map.startStoryline(map.getStorypointNodes(), slID);

            foreach (var sp in map.GetStoryline(slID).getStorypointList())
            {
                print("Storypoint " + sp.id + " and is in order " + map.GetStoryline(slID).isInOrder(sp));
            }

            /*List<Node> orderedPath = map.orderedPath(instantiatedNodes, slID);

            //map.setStorypointList(orderedPath);

            map.startStoryline(orderedPath, slID);

            map.GetStoryline(slID).getStorypointList()[0].setBeacon(new iBeaconServer("B9407F30-F5F8-466E-AFF9-25556B57FE6D", 38714, 26839));

            POS sp = map.GetStoryline(slID).getStorypointList()[0];

            sp.displayStorylinePopUpWindow();

            /*print(map.GetStoryline(slID).getStorypointList().Count);
            foreach (var sp in map.GetStoryline(slID).getStorypointList())
            {
                print(sp.storylineID);
            }

            /*
            foreach (var d in sp.GetPoiDescriptionList())
            {
                print("Title: " + d.title + ", language: " + d.language + ", description: " + d.summary);
            }*/

            //map.GetStoryline(slID).getStorypointList()[0].setBeacon(new iBeaconServer("B9407F30-F5F8-466E-AFF9-25556B57FE6D", 38714, 26839));

            //shortestPathCreator.transform.position = new Vector3(instantiatedNodes[0].transform.position.x, instantiatedNodes[0].transform.position.y, -7);
        }