USER-20250311WE\Administrator 7 сар өмнө
parent
commit
c3283f7900

+ 7 - 7
ActionTowerDefense/Assets/GameLevelEditor/GAAWCITY/TimelineUI/Prefabs/Components/TimelineHeaderItem.prefab

@@ -53,7 +53,7 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 11a92cb174cb45849bd252256ed4e15e, type: 3}
   m_Script: {fileID: 11500000, guid: 11a92cb174cb45849bd252256ed4e15e, type: 3}
   m_Name: 
   m_Name: 
   m_EditorClassIdentifier: 
   m_EditorClassIdentifier: 
-  date: {fileID: 1603058027483910865}
+  sec: {fileID: 1603058027483910865}
   time: {fileID: 993578053485450016}
   time: {fileID: 993578053485450016}
   plumbline: {fileID: 8844171176440012845}
   plumbline: {fileID: 8844171176440012845}
 --- !u!1 &1325046673220579939
 --- !u!1 &1325046673220579939
@@ -91,7 +91,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: 0.00012684, y: -17.4}
+  m_AnchoredPosition: {x: 0.00012684, y: -12.6}
   m_SizeDelta: {x: 45.969, y: 22.6626}
   m_SizeDelta: {x: 45.969, y: 22.6626}
   m_Pivot: {x: 0.5, y: 0.5}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &6144773953043303611
 --- !u!222 &6144773953043303611
@@ -203,7 +203,7 @@ GameObject:
   - component: {fileID: 1264161949670070141}
   - component: {fileID: 1264161949670070141}
   - component: {fileID: 1603058027483910865}
   - component: {fileID: 1603058027483910865}
   m_Layer: 5
   m_Layer: 5
-  m_Name: Date
+  m_Name: Sec
   m_TagString: Untagged
   m_TagString: Untagged
   m_Icon: {fileID: 0}
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_NavMeshLayer: 0
@@ -257,7 +257,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
   m_OnCullStateChanged:
     m_PersistentCalls:
     m_PersistentCalls:
       m_Calls: []
       m_Calls: []
-  m_text: 12/31
+  m_text: (0)
   m_isRightToLeft: 0
   m_isRightToLeft: 0
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
   m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -419,13 +419,13 @@ MonoBehaviour:
   m_faceColor:
   m_faceColor:
     serializedVersion: 2
     serializedVersion: 2
     rgba: 4294967295
     rgba: 4294967295
-  m_fontSize: 10
-  m_fontSizeBase: 10
+  m_fontSize: 20
+  m_fontSizeBase: 20
   m_fontWeight: 400
   m_fontWeight: 400
   m_enableAutoSizing: 0
   m_enableAutoSizing: 0
   m_fontSizeMin: 18
   m_fontSizeMin: 18
   m_fontSizeMax: 72
   m_fontSizeMax: 72
-  m_fontStyle: 0
+  m_fontStyle: 1
   m_HorizontalAlignment: 2
   m_HorizontalAlignment: 2
   m_VerticalAlignment: 512
   m_VerticalAlignment: 512
   m_textAlignment: 65535
   m_textAlignment: 65535

+ 18 - 56
ActionTowerDefense/Assets/GameLevelEditor/GAAWCITY/TimelineUI/Scripts/TimelineController.cs

@@ -10,11 +10,6 @@ namespace TimelineViewer
 
 
     public enum TimelineIncrements
     public enum TimelineIncrements
     {
     {
-        Hours,
-        HalfHour,
-        QuaterHours,
-        TenthHours,
-        FifthHours,
         Minutes
         Minutes
     }
     }
 
 
@@ -28,8 +23,6 @@ namespace TimelineViewer
             TwentyFour
             TwentyFour
         }
         }
 
 
-        int[] incrementMultiplier = { 0, 30, 15, 10, 5, 1 };
-
         [Header("Text & Styles")]
         [Header("Text & Styles")]
         [SerializeField] string timelineHeaderText;
         [SerializeField] string timelineHeaderText;
         [SerializeField] Color timelineHeaderColor;
         [SerializeField] Color timelineHeaderColor;
@@ -40,7 +33,8 @@ namespace TimelineViewer
 
 
         [Header("Clock Settings")]
         [Header("Clock Settings")]
         [SerializeField] ClockType clockType;
         [SerializeField] ClockType clockType;
-        [SerializeField] TimelineIncrements increments;
+        [SerializeField] int increments;
+        public int maxMinute;
 
 
 
 
         [HideInInspector]
         [HideInInspector]
@@ -59,7 +53,7 @@ namespace TimelineViewer
 
 
         Transform timelineHeaderTransform;
         Transform timelineHeaderTransform;
 
 
-        public TimelineIncrements DailyIncements { get; private set; }
+        public int DailyIncements { get; private set; }
 
 
         public int TimeCount { get; private set; }
         public int TimeCount { get; private set; }
 
 
@@ -70,6 +64,8 @@ namespace TimelineViewer
 
 
         TimelineSwimlaneController timelineSwimlaneController;
         TimelineSwimlaneController timelineSwimlaneController;
 
 
+        
+
         // Start is called before the first frame update
         // Start is called before the first frame update
         void Start()
         void Start()
         {
         {
@@ -116,59 +112,25 @@ namespace TimelineViewer
 
 
         private void SetupTimelineHeader()
         private void SetupTimelineHeader()
         {
         {
-            for (int m = ScenarioStartTime.m_DateTime.Month; m <= ScenarioEndTime.m_DateTime.Month; m++)
+            for (int i = 0; i <= getIncrements(); i++)
             {
             {
-                for (int d = ScenarioStartTime.m_DateTime.Day; d <= ScenarioEndTime.m_DateTime.Day; d++)
-                {
-                    for (int h = 0; h < 24; h++)
-                    {
-                        int cH = h;
-                        if (clockType == ClockType.Twelve)
-                        {
-                            if (h > 12)
-                            {
-                                cH = h - 12;
-                            }
-                            else if (h == 0)
-                            {
-                                cH = 12;
-                            }
-                        }
-
-                        for (int i = 0; i < getIncrements(); i++)
-                        {
-                            var headerItem = Instantiate(timelineHeaderItemPrefab, timelineHeaderTransform, false);
-                            var date = headerItem.GetComponent<TimelineHeaderItem>();
-
-                            date.SetTextColor(timelineHeaderColor);
-                            date.SetDateTime(m, d, cH, i * incrementMultiplier[(int)increments]);
-
-                            TimeCount++;
-                        }
-                    }
-                }
+                var headerItem = Instantiate(timelineHeaderItemPrefab, timelineHeaderTransform, false);
+                var date = headerItem.GetComponent<TimelineHeaderItem>();
+
+                print(date);
+                print(timelineHeaderColor);
+                date.SetTextColor(timelineHeaderColor);
+                date.SetDateTime(i * increments);
+
+                TimeCount++;
             }
             }
         }
         }
 
 
         private int getIncrements()
         private int getIncrements()
         {
         {
-            switch (increments)
-            {
-                case TimelineIncrements.Hours:
-                    return 1;
-                case TimelineIncrements.HalfHour:
-                    return 2;
-                case TimelineIncrements.QuaterHours:
-                    return 4;
-                case TimelineIncrements.TenthHours:
-                    return 6;
-                case TimelineIncrements.FifthHours:
-                    return 11;
-                case TimelineIncrements.Minutes:
-                    return 55;
-                default:
-                    return 1;
-            }
+            int incm = (maxMinute * 60 / increments);
+            return incm;
         }
         }
+        
     }
     }
 }
 }

+ 7 - 14
ActionTowerDefense/Assets/GameLevelEditor/GAAWCITY/TimelineUI/Scripts/TimelineHeaderItem.cs

@@ -7,29 +7,22 @@ namespace TimelineViewer
 {
 {
     public class TimelineHeaderItem : MonoBehaviour
     public class TimelineHeaderItem : MonoBehaviour
     {
     {
-        [HideInInspector][SerializeField] TextMeshProUGUI date;
-        [HideInInspector][SerializeField] TextMeshProUGUI time;
-        [HideInInspector][SerializeField] GameObject plumbline;
+        [SerializeField] TextMeshProUGUI sec;
+        [SerializeField] TextMeshProUGUI time;
+        [SerializeField] GameObject plumbline;
 
 
         public RectTransform PlumblineVector { get { return plumbline.GetComponent<RectTransform>(); } }
         public RectTransform PlumblineVector { get { return plumbline.GetComponent<RectTransform>(); } }
 
 
         public void SetTextColor(Color color)
         public void SetTextColor(Color color)
         {
         {
-            date.color = new Color(color.r, color.g, color.b, color.a);
+            sec.color = new Color(color.r, color.g, color.b, color.a);
             time.color = new Color(color.r, color.g, color.b, color.a);
             time.color = new Color(color.r, color.g, color.b, color.a);
         }
         }
 
 
-        public void SetDateTime(int month, int day, int hour, int min = 0)
+        public void SetDateTime(int second)
         {
         {
-            if (min == 0)
-            {
-                date.text = $"{month.ToString("00")}/{day.ToString("00")}";
-            }
-            else
-            {
-                date.text = "";
-            }
-            time.text = $"{hour.ToString("00")}:{min.ToString("00")}";
+            sec.text = $"({second}s)";
+            time.text = $"{second/60}:{second%60:00}";
         }
         }
     }
     }
 }
 }

+ 3 - 42
ActionTowerDefense/Assets/GameLevelEditor/GAAWCITY/TimelineUI/Scripts/TimelineSwimlaneController.cs

@@ -25,7 +25,7 @@ namespace TimelineViewer
 
 
         TimelineSwimlane swimLaneTS;
         TimelineSwimlane swimLaneTS;
 
 
-        TimelineIncrements dailyIncrements;
+        int dailyIncrements;
 
 
         public static int SwimLaneCount { get { return swimlanes.Count; } }
         public static int SwimLaneCount { get { return swimlanes.Count; } }
         public List<string> CurrentSwimlanes { get { return swimlanes.Values.Select(p => p.swimlaneLabel.SwimlaneName).ToList(); } }
         public List<string> CurrentSwimlanes { get { return swimlanes.Values.Select(p => p.swimlaneLabel.SwimlaneName).ToList(); } }
@@ -38,7 +38,7 @@ namespace TimelineViewer
         }
         }
 
 
 
 
-        public void AddSwimlane(string laneName, Transform parent, int timeCount, TimelineIncrements increments)
+        public void AddSwimlane(string laneName, Transform parent, int timeCount, int increments)
         {
         {
             dailyIncrements = increments;
             dailyIncrements = increments;
 
 
@@ -119,46 +119,7 @@ namespace TimelineViewer
             int posInt = (int)Math.Truncate(difference.TotalHours);
             int posInt = (int)Math.Truncate(difference.TotalHours);
             float posfl = (float)difference.TotalHours - posInt;
             float posfl = (float)difference.TotalHours - posInt;
 
 
-            if (dailyIncrements == TimelineIncrements.HalfHour)
-            {
-                int newPosInt = posInt * 2;
-                float newPosFl = posfl * 2;
-
-                var newTotalHours = (double)newPosInt + newPosFl;
-
-                return newTotalHours;
-            }
-            else if (dailyIncrements == TimelineIncrements.QuaterHours)
-            {
-                int newPosInt = posInt * 4;
-                float newPosFl = posfl * 4;
-
-                var newTotalHours = (double)newPosInt + newPosFl;
-
-                return newTotalHours;
-            }
-            else if (dailyIncrements == TimelineIncrements.TenthHours)
-            {
-                int newPosInt = posInt * 6;
-                float newPosFl = posfl * 6;
-
-                var newTotalHours = (double)newPosInt + newPosFl;
-
-                return newTotalHours;
-            }
-            else if (dailyIncrements == TimelineIncrements.FifthHours)
-            {
-                int newPosInt = posInt * 11;
-                float newPosFl = posfl * 12;
-
-                var newTotalHours = (double)newPosInt + newPosFl;
-
-                return newTotalHours;
-            }
-            else
-            {
-                return difference.TotalHours;
-            }
+            return difference.TotalHours;
         }
         }
     }
     }
 }
 }

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
ActionTowerDefense/Assets/GameLevelEditor/maps.asset


+ 7 - 7
ActionTowerDefense/Assets/GameLevelEditor/tiles.asset

@@ -16,45 +16,45 @@ MonoBehaviour:
   - id: 167
   - id: 167
     sprite: {fileID: 21300000, guid: 65b0651ef19a49c4e9c6c4ff297c3d52, type: 3}
     sprite: {fileID: 21300000, guid: 65b0651ef19a49c4e9c6c4ff297c3d52, type: 3}
     _aid: -1
     _aid: -1
-    type: 2
+    type: 1
     opt1: 0
     opt1: 0
     color: {r: 0.17626214, g: 1, b: 0, a: 1}
     color: {r: 0.17626214, g: 1, b: 0, a: 1}
     radius: {x: 0, y: 0}
     radius: {x: 0, y: 0}
   - id: 166
   - id: 166
     sprite: {fileID: 21300000, guid: 65b0651ef19a49c4e9c6c4ff297c3d52, type: 3}
     sprite: {fileID: 21300000, guid: 65b0651ef19a49c4e9c6c4ff297c3d52, type: 3}
     _aid: -1
     _aid: -1
-    type: 3
+    type: 2
     opt1: 0
     opt1: 0
     color: {r: 1, g: 0, b: 0, a: 1}
     color: {r: 1, g: 0, b: 0, a: 1}
     radius: {x: 0, y: 0}
     radius: {x: 0, y: 0}
   - id: 163
   - id: 163
     sprite: {fileID: 21300000, guid: 01c1ca6a4fe22a94b91a3b2b90b5c88f, type: 3}
     sprite: {fileID: 21300000, guid: 01c1ca6a4fe22a94b91a3b2b90b5c88f, type: 3}
     _aid: -1
     _aid: -1
-    type: 4
+    type: 3
     opt1: 0
     opt1: 0
     color: {r: 1, g: 1, b: 1, a: 1}
     color: {r: 1, g: 1, b: 1, a: 1}
     radius: {x: 1, y: 1}
     radius: {x: 1, y: 1}
   - id: 164
   - id: 164
     sprite: {fileID: 21300000, guid: 43f59a03605a34d4abed7ed387066287, type: 3}
     sprite: {fileID: 21300000, guid: 43f59a03605a34d4abed7ed387066287, type: 3}
     _aid: -1
     _aid: -1
-    type: 4
+    type: 3
     opt1: 1
     opt1: 1
     color: {r: 1, g: 1, b: 1, a: 1}
     color: {r: 1, g: 1, b: 1, a: 1}
     radius: {x: 1, y: 2}
     radius: {x: 1, y: 2}
   - id: 165
   - id: 165
     sprite: {fileID: 21300000, guid: b371758afaed0994e9076c34d8dbac5f, type: 3}
     sprite: {fileID: 21300000, guid: b371758afaed0994e9076c34d8dbac5f, type: 3}
     _aid: -1
     _aid: -1
-    type: 4
+    type: 3
     opt1: 2
     opt1: 2
     color: {r: 1, g: 1, b: 1, a: 1}
     color: {r: 1, g: 1, b: 1, a: 1}
     radius: {x: 2, y: 1}
     radius: {x: 2, y: 1}
   - id: 168
   - id: 168
     sprite: {fileID: 21300000, guid: 01c1ca6a4fe22a94b91a3b2b90b5c88f, type: 3}
     sprite: {fileID: 21300000, guid: 01c1ca6a4fe22a94b91a3b2b90b5c88f, type: 3}
     _aid: -1
     _aid: -1
-    type: 1
+    type: 3
     opt1: 0
     opt1: 0
     color: {r: 0.1495924, g: 1, b: 0, a: 1}
     color: {r: 0.1495924, g: 1, b: 0, a: 1}
-    radius: {x: 0, y: 0}
+    radius: {x: 2, y: 2}
   autoTiles:
   autoTiles:
   - id: 1
   - id: 1
     tiles:
     tiles:

+ 7 - 3
ActionTowerDefense/Assets/Scenes/Editor.unity

@@ -5402,11 +5402,15 @@ PrefabInstance:
       objectReference: {fileID: 0}
       objectReference: {fileID: 0}
     - target: {fileID: 1678911143623422894, guid: ef1e41dbea8b2144b9e0b405402faeef, type: 3}
     - target: {fileID: 1678911143623422894, guid: ef1e41dbea8b2144b9e0b405402faeef, type: 3}
       propertyPath: clockType
       propertyPath: clockType
-      value: 0
+      value: 1
+      objectReference: {fileID: 0}
+    - target: {fileID: 1678911143623422894, guid: ef1e41dbea8b2144b9e0b405402faeef, type: 3}
+      propertyPath: maxMinute
+      value: 60
       objectReference: {fileID: 0}
       objectReference: {fileID: 0}
     - target: {fileID: 1678911143623422894, guid: ef1e41dbea8b2144b9e0b405402faeef, type: 3}
     - target: {fileID: 1678911143623422894, guid: ef1e41dbea8b2144b9e0b405402faeef, type: 3}
       propertyPath: increments
       propertyPath: increments
-      value: 0
+      value: 1
       objectReference: {fileID: 0}
       objectReference: {fileID: 0}
     - target: {fileID: 1678911143623422894, guid: ef1e41dbea8b2144b9e0b405402faeef, type: 3}
     - target: {fileID: 1678911143623422894, guid: ef1e41dbea8b2144b9e0b405402faeef, type: 3}
       propertyPath: endTime._dateTime
       propertyPath: endTime._dateTime
@@ -5414,7 +5418,7 @@ PrefabInstance:
       objectReference: {fileID: 0}
       objectReference: {fileID: 0}
     - target: {fileID: 1678911143623422894, guid: ef1e41dbea8b2144b9e0b405402faeef, type: 3}
     - target: {fileID: 1678911143623422894, guid: ef1e41dbea8b2144b9e0b405402faeef, type: 3}
       propertyPath: timelineHeaderText
       propertyPath: timelineHeaderText
-      value: Marathon
+      value: Timeline
       objectReference: {fileID: 0}
       objectReference: {fileID: 0}
     - target: {fileID: 1678911143623422894, guid: ef1e41dbea8b2144b9e0b405402faeef, type: 3}
     - target: {fileID: 1678911143623422894, guid: ef1e41dbea8b2144b9e0b405402faeef, type: 3}
       propertyPath: startTime._dateTime
       propertyPath: startTime._dateTime

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно