allow access to other data of entity

This commit is contained in:
minenice55 2022-08-21 22:25:39 -04:00
parent dde481c8d8
commit 4b83724079
1 changed files with 44 additions and 29 deletions

View File

@ -13,6 +13,7 @@ namespace HeavenStudio
[Serializable]
public class DynamicBeatmap
{
public static int CurrentRiqVersion = 0;
public float bpm;
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
@ -24,7 +25,7 @@ namespace HeavenStudio
{"productversion", 000},
{"productsubversion", 0},
//file format version
{"riqversion", 0},
{"riqversion", CurrentRiqVersion},
// general chart info
{"remixtitle", "New Remix"}, // chart name
@ -96,6 +97,19 @@ namespace HeavenStudio
{
get
{
switch (propertyName)
{
case "beat":
return beat;
case "track":
return track;
case "length":
return length;
case "swing":
return swing;
case "datamodel":
return datamodel;
default:
//TODO: do this checking and conversion on load instead of at runtime
Minigames.Minigame game = EventCaller.instance.GetMinigame(datamodel.Split(0));
Minigames.GameAction action = EventCaller.instance.GetGameAction(game, datamodel.Split(1));
@ -130,6 +144,7 @@ namespace HeavenStudio
return param.parameter;
}
}
}
set
{
if (DynamicData.ContainsKey(propertyName))