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

View file

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