Ejemplo n.º 1
0
    public void RefreshElements(Vector3 target, GameObject panorama, ERainType rain)
    {
        // Update panorama
        foreach (Transform child in layersContainer)
        {
            Destroy(child.gameObject);
        }

        GameObject layer = null;

        for (int i = 0; i < panorama.transform.childCount; i++)
        {
            layer     = Instantiate(panorama.transform.GetChild(i).gameObject, layersContainer);
            layers[i] = layer.GetComponent <TelescopeLayer>();
        }

        rainManager = layer.GetComponent <RainManager>();
        rainManager.UpdateRain(rain);

        ResetPosition();

        // Spwan map elements in sight
        foreach (MapElement element in boat.GetElementsInSight())
        {
            Island island = element.GetComponent <Island>();
            if (!island || island != boat.currentIsland)
            {
                AddElementToPanorama(element, target);
            }
        }

        RefreshElementsAngle();
    }
Ejemplo n.º 2
0
 public void StartNavigation()
 {
     ResetZoom();
     rainManager.UpdateRain(ERainType.NONE);
 }