properties import??? i think???

no idea what's even going on anymore
This commit is contained in:
ThatZeoMan 2022-08-17 23:08:47 -05:00
parent 8ac8131458
commit 8649e12908
3 changed files with 27 additions and 31 deletions

View file

@ -4460,7 +4460,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -289.15, y: 2} m_AnchoredPosition: {x: -289.14996, y: 2}
m_SizeDelta: {x: -578.29, y: 49.92} m_SizeDelta: {x: -578.29, y: 49.92}
m_Pivot: {x: 0.5, y: 0} m_Pivot: {x: 0.5, y: 0}
--- !u!114 &156962255 --- !u!114 &156962255
@ -19841,8 +19841,8 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1589389272} m_TargetGraphic: {fileID: 1589389272}
m_HandleRect: {fileID: 1589389271} m_HandleRect: {fileID: 1589389271}
m_Direction: 2 m_Direction: 2
m_Value: 0 m_Value: 1
m_Size: 1 m_Size: 0.9978523
m_NumberOfSteps: 0 m_NumberOfSteps: 0
m_OnValueChanged: m_OnValueChanged:
m_PersistentCalls: m_PersistentCalls:
@ -24292,7 +24292,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5} m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -408.98004, y: -17} m_AnchoredPosition: {x: -408.98007, y: -17}
m_SizeDelta: {x: -817.96, y: -46.29} m_SizeDelta: {x: -817.96, y: -46.29}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1118147045 --- !u!1 &1118147045
@ -25461,7 +25461,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5} m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 130.0664} m_AnchoredPosition: {x: 0, y: 129.92245}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1154875944 --- !u!114 &1154875944
@ -33748,7 +33748,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: -27.593994} m_AnchoredPosition: {x: 0, y: -27.593987}
m_SizeDelta: {x: 1440.022, y: -113.04} m_SizeDelta: {x: 1440.022, y: -113.04}
m_Pivot: {x: 0, y: 0.5} m_Pivot: {x: 0, y: 0.5}
--- !u!114 &1527251881 --- !u!114 &1527251881
@ -35332,7 +35332,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1292844878} m_TargetGraphic: {fileID: 1292844878}
m_HandleRect: {fileID: 1292844877} m_HandleRect: {fileID: 1292844877}
m_Direction: 2 m_Direction: 2
m_Value: 0 m_Value: 1
m_Size: 1 m_Size: 1
m_NumberOfSteps: 0 m_NumberOfSteps: 0
m_OnValueChanged: m_OnValueChanged:
@ -37890,7 +37890,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: -27.992676} m_AnchoredPosition: {x: 0, y: -27.992668}
m_SizeDelta: {x: 32, y: -55.985} m_SizeDelta: {x: 32, y: -55.985}
m_Pivot: {x: 0, y: 0.5} m_Pivot: {x: 0, y: 0.5}
--- !u!114 &1747224097 --- !u!114 &1747224097
@ -39517,7 +39517,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: -84.99002} m_AnchoredPosition: {x: 0, y: -84.990036}
m_SizeDelta: {x: 320, y: -113.92} m_SizeDelta: {x: 320, y: -113.92}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!1 &1852819572 --- !u!1 &1852819572
@ -44568,7 +44568,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: -28.029907} m_AnchoredPosition: {x: 0, y: -28.0299}
m_SizeDelta: {x: 1054, y: -113.92} m_SizeDelta: {x: 1054, y: -113.92}
m_Pivot: {x: 0, y: 0.5} m_Pivot: {x: 0, y: 0.5}
--- !u!114 &2066632681 --- !u!114 &2066632681
@ -44916,7 +44916,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!224 &2086733128 --- !u!224 &2086733128
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View file

@ -378,6 +378,7 @@ namespace HeavenStudio.Editor
public void GetProperties(string json = "") public void GetProperties(string json = "")
{ {
PropController.instance.LoadProperties(json); PropController.instance.LoadProperties(json);
Debug.Log("properties sent");
} }
public void OpenRemix() public void OpenRemix()
@ -430,7 +431,7 @@ namespace HeavenStudio.Editor
} }
} }
} }
if (entry.Name == "properties.json") else if (entry.Name == "properties.json")
{ {
using (var stream = entry.Open()) using (var stream = entry.Open())
{ {

View file

@ -10,36 +10,31 @@ using HeavenStudio.Games;
namespace HeavenStudio.Editor namespace HeavenStudio.Editor
{ {
public class PropController : MonoBehaviour
{
public static PropController instance { get; private set; }
public Properties Properties = new Properties(); public class Properties
{
string levelName = "";
string levelCreator = "";
}
public class PropController
{
public static PropController instance { get; private set; } = new PropController();
public Properties properties;
public void LoadProperties(string json = "") public void LoadProperties(string json = "")
{ {
SortPropertyList();
if (json != "") if (json != "")
{ {
Properties = JsonConvert.DeserializeObject<Properties>(json); properties = JsonConvert.DeserializeObject<Properties>(json);
//Debug.Log("property 1 =" + (string)(levelName));
} }
else else
{ {
NewProperties(); properties = new Properties();
} }
Conductor.instance.SetBpm(Beatmap.bpm);
Conductor.instance.SetVolume(Beatmap.musicVolume);
Conductor.instance.firstBeatOffset = Beatmap.firstBeatOffset;
Stop(0);
SetCurrentEventToClosest(0);
} }
public void SortPropertyList()
{
Beatmap.entities.Sort((x, y) => x.beat.CompareTo(y.beat));
Beatmap.tempoChanges.Sort((x, y) => x.beat.CompareTo(y.beat));
}
} }
} }