Exemple #1
0
    public IEnumerator getPath()
    {
        yield return new WaitForSeconds(1.0f);

        sd = FindObjectOfType<StorylineDriver>();

        path = sd.getMap().orderedPath(sd.getMap().getStorypointNodes(), 0);

        this.transform.GetChild (0).transform.GetComponent<SpriteRenderer> ().enabled = true;
        transform.position = new Vector3(sd.XCoordinatesConversion(path[0].x, sd.getMap().getFloors()[0].getImageWidth()), sd.YCoordinatesConversion(path[0].y, sd.getMap().getFloors()[0].getImageHeight()), -8);
    }
        public IEnumerator getMapController()
        {
            yield return new WaitForSeconds(0.5f);

            slDriver = FindObjectOfType<StorylineDriver>();
            frDriver = FindObjectOfType<FreeRoamingDriver>();
            if (frDriver != null)
                nodesArray = frDriver.getArrayOfNodes();
            //if (slDriver != null)
              //  nodesGameObjects = slDriver.GetNodeGameObjects();
            //transform.position = new Vector3(nodesGameObjects[1].transform.position.x, nodesGameObjects[1].transform.position.y, -7);
            mc = FindObjectOfType<MapController>();
            map = mc.getMap();
        }