it just keeps getting worse
old plan abandoned, now properties are hardcoded
This commit is contained in:
parent
d46319a813
commit
f522a1a398
|
@ -1337,7 +1337,7 @@ MonoBehaviour:
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: "AWWWWWWW BWWWWWWW\u200B"
|
m_text: "\u200B"
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 4810e200fa0cb24438bac52343d7674b, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: 4810e200fa0cb24438bac52343d7674b, type: 2}
|
||||||
m_sharedMaterial: {fileID: 8580487687356851718, guid: 4810e200fa0cb24438bac52343d7674b, type: 2}
|
m_sharedMaterial: {fileID: 8580487687356851718, guid: 4810e200fa0cb24438bac52343d7674b, type: 2}
|
||||||
|
@ -18737,7 +18737,7 @@ MonoBehaviour:
|
||||||
m_ChildControlWidth: 0
|
m_ChildControlWidth: 0
|
||||||
m_ChildControlHeight: 0
|
m_ChildControlHeight: 0
|
||||||
m_ChildScaleWidth: 0
|
m_ChildScaleWidth: 0
|
||||||
m_ChildScaleHeight: 0
|
m_ChildScaleHeight: 1
|
||||||
m_ReverseArrangement: 0
|
m_ReverseArrangement: 0
|
||||||
--- !u!114 &830452354
|
--- !u!114 &830452354
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
@ -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.98007, y: -17}
|
m_AnchoredPosition: {x: -408.98013, 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
|
||||||
|
@ -25730,7 +25730,6 @@ RectTransform:
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 1344658867}
|
- {fileID: 1344658867}
|
||||||
- {fileID: 2009181867}
|
- {fileID: 2009181867}
|
||||||
- {fileID: 1252591648}
|
|
||||||
m_Father: {fileID: 1745456516}
|
m_Father: {fileID: 1745456516}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
@ -27527,6 +27526,7 @@ GameObject:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 1252591648}
|
- component: {fileID: 1252591648}
|
||||||
|
- component: {fileID: 1252591649}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: String
|
m_Name: String
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
@ -27543,18 +27543,31 @@ RectTransform:
|
||||||
m_GameObject: {fileID: 1252591647}
|
m_GameObject: {fileID: 1252591647}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1.0000796, y: 1.0000796, z: 1.0000796}
|
m_LocalScale: {x: 1.0000798, y: 1.0000798, z: 1.0000798}
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 1980463954}
|
- {fileID: 1980463954}
|
||||||
- {fileID: 1425536043}
|
- {fileID: 1425536043}
|
||||||
m_Father: {fileID: 1167667137}
|
m_Father: {fileID: 1344658867}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 0
|
||||||
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: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: -240.99994, y: 263.99997}
|
m_AnchoredPosition: {x: -240.99994, y: 263.99997}
|
||||||
m_SizeDelta: {x: 537.35, y: 50}
|
m_SizeDelta: {x: 537.35, y: 50}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1252591649
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1252591647}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: dfd9c4dee49957d4da897e02634ce6db, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
content: {fileID: 0}
|
||||||
--- !u!1 &1254178913
|
--- !u!1 &1254178913
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -30604,7 +30617,8 @@ RectTransform:
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children:
|
||||||
|
- {fileID: 1252591648}
|
||||||
m_Father: {fileID: 1167667137}
|
m_Father: {fileID: 1167667137}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
@ -31554,14 +31568,26 @@ MonoBehaviour:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_OnValueChanged:
|
m_OnValueChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 1252591649}
|
||||||
|
m_TargetAssemblyTypeName: HeavenStudio.Properties.RemixName, Assembly-CSharp
|
||||||
|
m_MethodName: Refresh
|
||||||
|
m_Mode: 0
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 0
|
||||||
|
m_CallState: 2
|
||||||
m_OnTouchScreenKeyboardStatusChanged:
|
m_OnTouchScreenKeyboardStatusChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||||
m_CustomCaretColor: 0
|
m_CustomCaretColor: 0
|
||||||
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
|
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
|
||||||
m_Text: AWWWWWWW BWWWWWWW
|
m_Text:
|
||||||
m_CaretBlinkRate: 0.85
|
m_CaretBlinkRate: 0.85
|
||||||
m_CaretWidth: 1
|
m_CaretWidth: 1
|
||||||
m_ReadOnly: 0
|
m_ReadOnly: 0
|
||||||
|
|
|
@ -507,8 +507,12 @@ namespace HeavenStudio.Editor
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetPropertiesJson() =>
|
public string GetPropertiesJson()
|
||||||
JsonConvert.SerializeObject(Properties.PropController.instance.properties);
|
{
|
||||||
|
string json = string.Empty;
|
||||||
|
json = JsonConvert.SerializeObject(Properties.PropController.instance.properties);
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
public void SetGameEventTitle(string txt)
|
public void SetGameEventTitle(string txt)
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,11 +55,15 @@ namespace HeavenStudio.Properties
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Properties
|
public class Properties
|
||||||
{
|
{
|
||||||
|
public static Properties instance { get; private set; } = new Properties();
|
||||||
|
|
||||||
//this is just copied from the beatmap lol
|
//this is just copied from the beatmap lol
|
||||||
public string levelName = "test";
|
public string levelName = "asdf";
|
||||||
public string levelCreator = "testCreator";
|
public string levelCreator = "testCreator";
|
||||||
public int Number;
|
public int Number;
|
||||||
|
|
||||||
|
public string datamodel;
|
||||||
|
|
||||||
public object this[string propertyName]
|
public object this[string propertyName]
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -78,7 +82,6 @@ namespace HeavenStudio.Properties
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PropController
|
public class PropController
|
||||||
|
|
8
Assets/Scripts/LevelEditor/Properties/PropList.meta
Normal file
8
Assets/Scripts/LevelEditor/Properties/PropList.meta
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 80e5db7602a2b044ba965c556335a757
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
17
Assets/Scripts/LevelEditor/Properties/PropList/RemixName.cs
Normal file
17
Assets/Scripts/LevelEditor/Properties/PropList/RemixName.cs
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace HeavenStudio.Properties
|
||||||
|
{
|
||||||
|
public class RemixName : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] private GameObject content;
|
||||||
|
|
||||||
|
public void Refresh(string content)
|
||||||
|
{
|
||||||
|
Properties.instance.levelName = content;
|
||||||
|
Debug.Log(Properties.instance.levelName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: dfd9c4dee49957d4da897e02634ce6db
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -15,7 +15,7 @@ namespace HeavenStudio.Properties
|
||||||
{
|
{
|
||||||
|
|
||||||
public TMP_Text caption;
|
public TMP_Text caption;
|
||||||
[SerializeField] private PropManager parameterManager;
|
[SerializeField] private RemixParameterManager parameterManager;
|
||||||
|
|
||||||
[Header("Integer and Float")]
|
[Header("Integer and Float")]
|
||||||
[Space(10)]
|
[Space(10)]
|
||||||
|
|
|
@ -6,8 +6,11 @@ using HeavenStudio.Editor.Track;
|
||||||
|
|
||||||
namespace HeavenStudio.Properties
|
namespace HeavenStudio.Properties
|
||||||
{
|
{
|
||||||
public class EventParameterManager : MonoBehaviour
|
public class RemixParameterManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
[Header("General References")]
|
||||||
|
[SerializeField] private GameObject eventSelector;
|
||||||
|
|
||||||
[Header("Property Prefabs")]
|
[Header("Property Prefabs")]
|
||||||
[SerializeField] private GameObject IntegerP;
|
[SerializeField] private GameObject IntegerP;
|
||||||
[SerializeField] private GameObject FloatP;
|
[SerializeField] private GameObject FloatP;
|
||||||
|
@ -16,6 +19,36 @@ namespace HeavenStudio.Properties
|
||||||
[SerializeField] private GameObject ColorP;
|
[SerializeField] private GameObject ColorP;
|
||||||
[SerializeField] private GameObject StringP;
|
[SerializeField] private GameObject StringP;
|
||||||
|
|
||||||
|
public bool active;
|
||||||
|
|
||||||
|
public void StartParams(Beatmap.Entity entity)
|
||||||
|
{
|
||||||
|
active = true;
|
||||||
|
AddParams(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddParams(Beatmap.Entity entity)
|
||||||
|
{
|
||||||
|
var minigame = EventCaller.instance.GetMinigame(Properties.instance.datamodel.Split(0));
|
||||||
|
int actionIndex = minigame.actions.IndexOf(minigame.actions.Find(c => c.actionName == Properties.instance.datamodel.Split(1)));
|
||||||
|
Minigames.GameAction action = minigame.actions[actionIndex];
|
||||||
|
|
||||||
|
if (action.parameters != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
for (int i = 0; i < action.parameters.Count; i++)
|
||||||
|
{
|
||||||
|
object param = action.parameters[i].parameter;
|
||||||
|
string caption = action.parameters[i].propertyCaption;
|
||||||
|
string propertyName = action.parameters[i].propertyName;
|
||||||
|
string tooltip = action.parameters[i].tooltip;
|
||||||
|
|
||||||
|
AddParam(propertyName, param, caption);
|
||||||
|
}
|
||||||
|
|
||||||
|
active = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void AddParam(string propertyName, object type, string caption)
|
private void AddParam(string propertyName, object type, string caption)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue