예제 #1
0
            public void Show(bool show, string iconPrefabName, UIBaseMap mapInstance, UIMapsObject regObj, System.Action <MapMarker> markerInitializer)
            {
                if (mapInstance == null)
                {
                    return;
                }

                if (show)
                {
                    if (mapMarker == null)
                    {
                        MapMarker prefab = GetMapMarkerPrefab(iconPrefabName);
                        if (prefab != null)
                        {
                            mapMarker = mapInstance.AddMapMarker(prefab, regObj);
                            if (markerInitializer != null)
                            {
                                markerInitializer(mapMarker);
                            }
                        }
                    }
                }
                else
                {
                    if (mapMarker != null)
                    {
                        // should set to null
                        mapMarker = mapInstance.RemoveMapMarker(mapMarker);
                    }
                }
            }
예제 #2
0
 public void InitializeRuntime()
 {
     showMaps  = new ShowMap[] { new ShowMap(), new ShowMap(), new ShowMap(), new ShowMap() };
     instances = new UIBaseMap[] {
         UIMainMap.instance.baseMapParameters,
         UIMiniMap.instance.baseMapParameters,
         UICompass.instance.baseMapParameters,
         UIScreenMap.instance.baseMapParameters
     };
     iconNames = new string[] { mainMapIconName, miniMapIconName, compassIconName, screenMapIconName };
 }