예제 #1
0
        internal static void CreateMarker(LocalMap map, PointerEventData eventData)
        {
            ModMapMarker marker = NewMarker(map, eventData);

            LocalMap.Markers.Add(marker);
            LocalMap_Set(map);  // Force a refresh to display the new mark
            Game.Instance.UI.Common.UISound.Play(UISoundType.ButtonClick);
        }
예제 #2
0
        private static ModMapMarker NewMarker(LocalMap map, PointerEventData eventData)
        {
            string areaName = Game.Instance.CurrentlyLoadedArea.AreaDisplayName;
            List <ModMapMarker> markersForArea;

            if (!AreaMarkers.TryGetValue(areaName, out markersForArea))
            {
                AreaMarkers[areaName] = new List <ModMapMarker>();
            }
            Vector3      position = GetPositionFromEvent(map, eventData);
            ModMapMarker marker   = new ModMapMarker(position);

            AreaMarkers[areaName].Add(marker);
            return(marker);
        }