예제 #1
0
 void OnEnable()
 {
     Load();
     SelectedMarker = null;
     if (markers == null)
     {
         markers = properties.chart == null
             ? new List <MarkerNode>()
             : properties.chart.Markers.Select(m => MarkerNode.Construct(m)).ToList();
     }
 }
예제 #2
0
        void CreateMarker(Vector2 position, Vector2 size, string category = "", string preset = "", MetaData metaData = null)
        {
            position   = (position - dragTotal - PANEL_OFFSET * Vector2.right) / scale;
            position.y = Map.height - position.y;
            var marker = new RawMarker(position, size, category, preset, metaData);

            chart.AddMarker(marker);
            var markerNode = MarkerNode.Construct(marker);

            markers.Add(markerNode);

            SelectedMarker = markerNode;
        }
예제 #3
0
 void LoadChart(ChartStatic chart)
 {
     if (chart == null)
     {
         markers.Clear();
         chartName = string.Empty;
     }
     else
     {
         markers   = chart.Markers.Select(m => MarkerNode.Construct(m)).ToList();
         chartName = chart.name;
     }
 }