mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-22 09:35:11 +00:00
start implementation of new format
needs fixes for some types
This commit is contained in:
parent
e09d8ad5dd
commit
dcb2a71b98
44 changed files with 374 additions and 209 deletions
|
@ -22,6 +22,8 @@ namespace HeavenStudio
|
||||||
// software version (MajorMinorPatch, revision)
|
// software version (MajorMinorPatch, revision)
|
||||||
{"productversion", 000},
|
{"productversion", 000},
|
||||||
{"productsubversion", 0},
|
{"productsubversion", 0},
|
||||||
|
//file format version
|
||||||
|
{"riqversion", 0},
|
||||||
|
|
||||||
// general chart info
|
// general chart info
|
||||||
{"remixtitle", "New Remix"}, // chart name
|
{"remixtitle", "New Remix"}, // chart name
|
||||||
|
@ -73,7 +75,7 @@ namespace HeavenStudio
|
||||||
public int track;
|
public int track;
|
||||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public float length;
|
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public float length;
|
||||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public float swing;
|
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public float swing;
|
||||||
public Dictionary<string, object> DynamicData = new Dictionary<string, object>();
|
public Dictionary<string, dynamic> DynamicData = new Dictionary<string, dynamic>();
|
||||||
|
|
||||||
public string datamodel;
|
public string datamodel;
|
||||||
[JsonIgnore] public Editor.Track.TimelineEventObj eventObj;
|
[JsonIgnore] public Editor.Track.TimelineEventObj eventObj;
|
||||||
|
@ -89,7 +91,7 @@ namespace HeavenStudio
|
||||||
return JsonConvert.DeserializeObject<DynamicEntity>(JsonConvert.SerializeObject(this));
|
return JsonConvert.DeserializeObject<DynamicEntity>(JsonConvert.SerializeObject(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
public object this[string propertyName]
|
public dynamic this[string propertyName]
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
@ -108,7 +110,7 @@ namespace HeavenStudio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateProperty(string name, object defaultValue)
|
public void CreateProperty(string name, dynamic defaultValue)
|
||||||
{
|
{
|
||||||
if (!DynamicData.ContainsKey(name))
|
if (!DynamicData.ContainsKey(name))
|
||||||
DynamicData.Add(name, defaultValue);
|
DynamicData.Add(name, defaultValue);
|
||||||
|
@ -159,5 +161,101 @@ namespace HeavenStudio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// converts from the old "rhmania" / "tengoku" format to the new "riq" format
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="beatmap">a deserialized .rhmania or .tengoku beatmap</param>
|
||||||
|
/// <returns>a .riq beatmap</returns>
|
||||||
|
public static DynamicBeatmap BeatmapConverter(Beatmap beatmap)
|
||||||
|
{
|
||||||
|
DynamicBeatmap dynamicBeatmap = new DynamicBeatmap();
|
||||||
|
dynamicBeatmap.bpm = beatmap.bpm;
|
||||||
|
dynamicBeatmap.musicVolume = beatmap.musicVolume;
|
||||||
|
dynamicBeatmap.firstBeatOffset = beatmap.firstBeatOffset;
|
||||||
|
|
||||||
|
foreach (var entity in beatmap.entities)
|
||||||
|
{
|
||||||
|
dynamicBeatmap.entities.Add(new DynamicEntity()
|
||||||
|
{
|
||||||
|
beat = entity.beat,
|
||||||
|
track = entity.track,
|
||||||
|
length = entity.length,
|
||||||
|
swing = entity.swing,
|
||||||
|
datamodel = entity.datamodel,
|
||||||
|
DynamicData = new Dictionary<string, dynamic>()
|
||||||
|
{
|
||||||
|
{ "valA", entity.valA },
|
||||||
|
{ "valB", entity.valB },
|
||||||
|
{ "valC", entity.valC },
|
||||||
|
|
||||||
|
{ "toggle", entity.toggle },
|
||||||
|
|
||||||
|
{ "type", entity.type },
|
||||||
|
{ "type2", entity.type2 },
|
||||||
|
{ "type3", entity.type3 },
|
||||||
|
{ "type4", entity.type4 },
|
||||||
|
{ "type5", entity.type5 },
|
||||||
|
{ "type6", entity.type6 },
|
||||||
|
|
||||||
|
{ "ease", entity.ease },
|
||||||
|
|
||||||
|
{ "colorA", entity.colorA },
|
||||||
|
{ "colorB", entity.colorB },
|
||||||
|
{ "colorC", entity.colorC },
|
||||||
|
{ "colorD", entity.colorD },
|
||||||
|
{ "colorE", entity.colorE },
|
||||||
|
{ "colorF", entity.colorF },
|
||||||
|
|
||||||
|
{ "text1", entity.text1 },
|
||||||
|
{ "text2", entity.text2 },
|
||||||
|
{ "text3", entity.text3 },
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
foreach (var tempoChange in beatmap.tempoChanges)
|
||||||
|
{
|
||||||
|
dynamicBeatmap.tempoChanges.Add(new TempoChange()
|
||||||
|
{
|
||||||
|
beat = tempoChange.beat,
|
||||||
|
length = tempoChange.length,
|
||||||
|
tempo = tempoChange.tempo
|
||||||
|
});
|
||||||
|
}
|
||||||
|
foreach (var volumeChange in beatmap.volumeChanges)
|
||||||
|
{
|
||||||
|
dynamicBeatmap.volumeChanges.Add(new VolumeChange()
|
||||||
|
{
|
||||||
|
beat = volumeChange.beat,
|
||||||
|
length = volumeChange.length,
|
||||||
|
volume = volumeChange.volume
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return dynamicBeatmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// FUTURE: converts from a karateka mania chart ("bor") to the "riq" format
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="bor">a rawtext .bor chart</param>
|
||||||
|
/// <returns>a .riq beatmap</returns>
|
||||||
|
/// <remarks>not implemented yet</remarks>
|
||||||
|
public static DynamicBeatmap KManiaBorConverter(String bor)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// updates an "riq" beatmap
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="beatmap">old beatmap</param>
|
||||||
|
/// <param name="version">version of old beatmap</param>
|
||||||
|
/// <returns>updated beatmap</returns>
|
||||||
|
/// <remarks>not implemented yet</remarks>
|
||||||
|
public static DynamicBeatmap BeatmapUpdater(DynamicBeatmap beatmap, int version)
|
||||||
|
{
|
||||||
|
return beatmap;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -245,9 +245,17 @@ namespace HeavenStudio
|
||||||
return tempoChanges;
|
return tempoChanges;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<DynamicBeatmap.TempoChange> GetSortedTempoChanges(DynamicBeatmap chart)
|
||||||
|
{
|
||||||
|
//iterate over all tempo changes, adding to counter
|
||||||
|
List<DynamicBeatmap.TempoChange> tempoChanges = chart.tempoChanges;
|
||||||
|
tempoChanges.Sort((x, y) => x.beat.CompareTo(y.beat)); //sorts all tempo changes by ascending time (GameManager already does this but juste en cas...)
|
||||||
|
return tempoChanges;
|
||||||
|
}
|
||||||
|
|
||||||
public float GetSongPosFromBeat(float beat)
|
public float GetSongPosFromBeat(float beat)
|
||||||
{
|
{
|
||||||
Beatmap chart = GameManager.instance.Beatmap;
|
var chart = GameManager.instance.Beatmap;
|
||||||
SetBpm(chart.bpm);
|
SetBpm(chart.bpm);
|
||||||
|
|
||||||
//initial counter
|
//initial counter
|
||||||
|
@ -257,7 +265,7 @@ namespace HeavenStudio
|
||||||
float lastTempoChangeBeat = 0f;
|
float lastTempoChangeBeat = 0f;
|
||||||
|
|
||||||
//iterate over all tempo changes, adding to counter
|
//iterate over all tempo changes, adding to counter
|
||||||
List<Beatmap.TempoChange> tempoChanges = GetSortedTempoChanges(chart);
|
var tempoChanges = GetSortedTempoChanges(chart);
|
||||||
foreach (var t in tempoChanges)
|
foreach (var t in tempoChanges)
|
||||||
{
|
{
|
||||||
if (t.beat > beat)
|
if (t.beat > beat)
|
||||||
|
@ -297,12 +305,12 @@ namespace HeavenStudio
|
||||||
public float GetBeatFromSongPos(float seconds)
|
public float GetBeatFromSongPos(float seconds)
|
||||||
{
|
{
|
||||||
// Debug.Log("Getting beat of seconds " + seconds);
|
// Debug.Log("Getting beat of seconds " + seconds);
|
||||||
Beatmap chart = GameManager.instance.Beatmap;
|
var chart = GameManager.instance.Beatmap;
|
||||||
float lastTempoChangeBeat = 0f;
|
float lastTempoChangeBeat = 0f;
|
||||||
float lastBpm = chart.bpm;
|
float lastBpm = chart.bpm;
|
||||||
float counterSeconds = -firstBeatOffset;
|
float counterSeconds = -firstBeatOffset;
|
||||||
|
|
||||||
List<Beatmap.TempoChange> tempoChanges = GetSortedTempoChanges(chart);
|
var tempoChanges = GetSortedTempoChanges(chart);
|
||||||
foreach (var t in tempoChanges)
|
foreach (var t in tempoChanges)
|
||||||
{
|
{
|
||||||
float beatToNext = t.beat - lastTempoChangeBeat;
|
float beatToNext = t.beat - lastTempoChangeBeat;
|
||||||
|
|
|
@ -10,5 +10,11 @@ namespace HeavenStudio
|
||||||
{
|
{
|
||||||
return s.Split('/')[index];
|
return s.Split('/')[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string GetExtension(this string s)
|
||||||
|
{
|
||||||
|
string[] split = s.Split('.');
|
||||||
|
return split[split.Length - 1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -71,7 +71,6 @@ namespace HeavenStudio
|
||||||
|
|
||||||
SetText(currEvent, $"CurrentEvent: {GameManager.instance.Beatmap.entities[GameManager.instance.currentEvent - minus].datamodel}");
|
SetText(currEvent, $"CurrentEvent: {GameManager.instance.Beatmap.entities[GameManager.instance.currentEvent - minus].datamodel}");
|
||||||
SetText(eventLength, $"Event Length: {GameManager.instance.Beatmap.entities[GameManager.instance.currentEvent - minus].length}");
|
SetText(eventLength, $"Event Length: {GameManager.instance.Beatmap.entities[GameManager.instance.currentEvent - minus].length}");
|
||||||
SetText(eventType, $"Event Type: {GameManager.instance.Beatmap.entities[GameManager.instance.currentEvent - minus].type}");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,16 +9,14 @@ namespace HeavenStudio
|
||||||
public class EventCaller : MonoBehaviour
|
public class EventCaller : MonoBehaviour
|
||||||
{
|
{
|
||||||
public Transform GamesHolder;
|
public Transform GamesHolder;
|
||||||
public Beatmap.Entity currentEntity = new Beatmap.Entity();
|
public DynamicBeatmap.DynamicEntity currentEntity = new DynamicBeatmap.DynamicEntity();
|
||||||
public string currentSwitchGame;
|
public string currentSwitchGame;
|
||||||
|
|
||||||
public delegate void EventCallback();
|
public delegate void EventCallback();
|
||||||
|
|
||||||
public static EventCaller instance { get; private set; }
|
public static EventCaller instance { get; private set; }
|
||||||
|
|
||||||
public List<Minigames.Minigame> minigames = new List<Minigames.Minigame>()
|
public List<Minigames.Minigame> minigames = new List<Minigames.Minigame>();
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
public Minigames.Minigame GetMinigame(string gameName)
|
public Minigames.Minigame GetMinigame(string gameName)
|
||||||
{
|
{
|
||||||
|
@ -34,7 +32,7 @@ namespace HeavenStudio
|
||||||
{
|
{
|
||||||
instance = this;
|
instance = this;
|
||||||
|
|
||||||
currentEntity = new Beatmap.Entity();
|
currentEntity = new DynamicBeatmap.DynamicEntity();
|
||||||
|
|
||||||
Minigames.Init(this);
|
Minigames.Init(this);
|
||||||
|
|
||||||
|
@ -60,7 +58,7 @@ namespace HeavenStudio
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CallEvent(Beatmap.Entity entity, bool gameActive)
|
public void CallEvent(DynamicBeatmap.DynamicEntity entity, bool gameActive)
|
||||||
{
|
{
|
||||||
string[] details = entity.datamodel.Split('/');
|
string[] details = entity.datamodel.Split('/');
|
||||||
Minigames.Minigame game = minigames.Find(c => c.name == details[0]);
|
Minigames.Minigame game = minigames.Find(c => c.name == details[0]);
|
||||||
|
@ -86,10 +84,10 @@ namespace HeavenStudio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<Beatmap.Entity> GetAllInGameManagerList(string gameName, string[] include)
|
public static List<DynamicBeatmap.DynamicEntity> GetAllInGameManagerList(string gameName, string[] include)
|
||||||
{
|
{
|
||||||
List<Beatmap.Entity> temp1 = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel.Split('/')[0] == gameName);
|
List<DynamicBeatmap.DynamicEntity> temp1 = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel.Split('/')[0] == gameName);
|
||||||
List<Beatmap.Entity> temp2 = new List<Beatmap.Entity>();
|
List<DynamicBeatmap.DynamicEntity> temp2 = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
for (int i = 0; i < temp1.Count; i++)
|
for (int i = 0; i < temp1.Count; i++)
|
||||||
{
|
{
|
||||||
if (include.Any(temp1[i].datamodel.Split('/')[1].Contains))
|
if (include.Any(temp1[i].datamodel.Split('/')[1].Contains))
|
||||||
|
@ -100,10 +98,10 @@ namespace HeavenStudio
|
||||||
return temp2;
|
return temp2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<Beatmap.Entity> GetAllInGameManagerListExclude(string gameName, string[] exclude)
|
public static List<DynamicBeatmap.DynamicEntity> GetAllInGameManagerListExclude(string gameName, string[] exclude)
|
||||||
{
|
{
|
||||||
List<Beatmap.Entity> temp1 = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel.Split('/')[0] == gameName);
|
List<DynamicBeatmap.DynamicEntity> temp1 = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel.Split('/')[0] == gameName);
|
||||||
List<Beatmap.Entity> temp2 = new List<Beatmap.Entity>();
|
List<DynamicBeatmap.DynamicEntity> temp2 = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
for (int i = 0; i < temp1.Count; i++)
|
for (int i = 0; i < temp1.Count; i++)
|
||||||
{
|
{
|
||||||
if (!exclude.Any(temp1[i].datamodel.Split('/')[1].Contains))
|
if (!exclude.Any(temp1[i].datamodel.Split('/')[1].Contains))
|
||||||
|
@ -114,18 +112,18 @@ namespace HeavenStudio
|
||||||
return temp2;
|
return temp2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<Beatmap.Entity> GetAllPlayerEntities(string gameName)
|
public static List<DynamicBeatmap.DynamicEntity> GetAllPlayerEntities(string gameName)
|
||||||
{
|
{
|
||||||
return GameManager.instance.playerEntities.FindAll(c => c.datamodel.Split('/')[0] == gameName);
|
return GameManager.instance.playerEntities.FindAll(c => c.datamodel.Split('/')[0] == gameName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<Beatmap.Entity> GetAllPlayerEntitiesExcept(string gameName)
|
public static List<DynamicBeatmap.DynamicEntity> GetAllPlayerEntitiesExcept(string gameName)
|
||||||
{
|
{
|
||||||
return GameManager.instance.playerEntities.FindAll(c => c.datamodel.Split('/')[0] != gameName);
|
return GameManager.instance.playerEntities.FindAll(c => c.datamodel.Split('/')[0] != gameName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// elaborate as fuck, boy
|
// elaborate as fuck, boy
|
||||||
public static List<Beatmap.Entity> GetAllPlayerEntitiesExceptBeforeBeat(string gameName, float beat)
|
public static List<DynamicBeatmap.DynamicEntity> GetAllPlayerEntitiesExceptBeforeBeat(string gameName, float beat)
|
||||||
{
|
{
|
||||||
return GameManager.instance.playerEntities.FindAll(c => c.datamodel.Split('/')[0] != gameName && c.beat < beat);
|
return GameManager.instance.playerEntities.FindAll(c => c.datamodel.Split('/')[0] != gameName && c.beat < beat);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,10 +12,10 @@ namespace HeavenStudio
|
||||||
public static GameCamera instance { get; private set; }
|
public static GameCamera instance { get; private set; }
|
||||||
public new Camera camera;
|
public new Camera camera;
|
||||||
|
|
||||||
private List<Beatmap.Entity> positionEvents = new List<Beatmap.Entity>();
|
private List<DynamicBeatmap.DynamicEntity> positionEvents = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
private List<Beatmap.Entity> rotationEvents = new List<Beatmap.Entity>();
|
private List<DynamicBeatmap.DynamicEntity> rotationEvents = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
private List<Beatmap.Entity> scaleEvents = new List<Beatmap.Entity>();
|
private List<DynamicBeatmap.DynamicEntity> scaleEvents = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
private List<Beatmap.Entity> shakeEvents = new List<Beatmap.Entity>();
|
private List<DynamicBeatmap.DynamicEntity> shakeEvents = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
default cam position, for quick-resetting
|
default cam position, for quick-resetting
|
||||||
|
@ -125,15 +125,15 @@ namespace HeavenStudio
|
||||||
float prog = Conductor.instance.GetPositionFromBeat(e.beat, e.length);
|
float prog = Conductor.instance.GetPositionFromBeat(e.beat, e.length);
|
||||||
if (prog >= 0f)
|
if (prog >= 0f)
|
||||||
{
|
{
|
||||||
EasingFunction.Function func = EasingFunction.GetEasingFunction(e.ease);
|
EasingFunction.Function func = EasingFunction.GetEasingFunction(e["ease"]);
|
||||||
float dx = func(positionLast.x, e.valA, Mathf.Min(prog, 1f));
|
float dx = func(positionLast.x, e["valA"], Mathf.Min(prog, 1f));
|
||||||
float dy = func(positionLast.y, e.valB, Mathf.Min(prog, 1f));
|
float dy = func(positionLast.y, e["valB"], Mathf.Min(prog, 1f));
|
||||||
float dz = func(positionLast.z, -e.valC, Mathf.Min(prog, 1f));
|
float dz = func(positionLast.z, -e["valC"], Mathf.Min(prog, 1f));
|
||||||
position = new Vector3(dx, dy, dz);
|
position = new Vector3(dx, dy, dz);
|
||||||
}
|
}
|
||||||
if (prog > 1f)
|
if (prog > 1f)
|
||||||
{
|
{
|
||||||
positionLast = new Vector3(e.valA, e.valB, -e.valC);
|
positionLast = new Vector3(e["valA"], e["valB"], -e["valC"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -145,16 +145,16 @@ namespace HeavenStudio
|
||||||
float prog = Conductor.instance.GetPositionFromBeat(e.beat, e.length);
|
float prog = Conductor.instance.GetPositionFromBeat(e.beat, e.length);
|
||||||
if (prog >= 0f)
|
if (prog >= 0f)
|
||||||
{
|
{
|
||||||
EasingFunction.Function func = EasingFunction.GetEasingFunction(e.ease);
|
EasingFunction.Function func = EasingFunction.GetEasingFunction(e["ease"]);
|
||||||
float dx = func(rotEluerLast.x, e.valA, Mathf.Min(prog, 1f));
|
float dx = func(rotEluerLast.x, e["valA"], Mathf.Min(prog, 1f));
|
||||||
float dy = func(rotEluerLast.y, e.valB, Mathf.Min(prog, 1f));
|
float dy = func(rotEluerLast.y, e["valB"], Mathf.Min(prog, 1f));
|
||||||
float dz = func(-rotEluerLast.z, e.valC, Mathf.Min(prog, 1f));
|
float dz = func(-rotEluerLast.z, e["valC"], Mathf.Min(prog, 1f));
|
||||||
rotEluer = new Vector3(dx, dy, dz); //I'm stupid and forgot to negate the rotation gfd 😢
|
rotEluer = new Vector3(dx, dy, dz); //I'm stupid and forgot to negate the rotation gfd 😢
|
||||||
|
|
||||||
}
|
}
|
||||||
if (prog > 1f)
|
if (prog > 1f)
|
||||||
{
|
{
|
||||||
rotEluerLast = new Vector3(e.valA, e.valB, -e.valC);
|
rotEluerLast = new Vector3(e["valA"], e["valB"], -e["valC"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ namespace HeavenStudio
|
||||||
if (prog >= 0f)
|
if (prog >= 0f)
|
||||||
{
|
{
|
||||||
float fac = Mathf.Cos(Time.time * 80f) * 0.5f;
|
float fac = Mathf.Cos(Time.time * 80f) * 0.5f;
|
||||||
shakeResult = new Vector3(fac * e.valA, fac * e.valB);
|
shakeResult = new Vector3(fac * e["valA"], fac * e["valB"]);
|
||||||
}
|
}
|
||||||
if (prog > 1f)
|
if (prog > 1f)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,8 +13,8 @@ namespace HeavenStudio
|
||||||
public class GameManager : MonoBehaviour
|
public class GameManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
[Header("Lists")]
|
[Header("Lists")]
|
||||||
public Beatmap Beatmap = new Beatmap();
|
public DynamicBeatmap Beatmap = new DynamicBeatmap();
|
||||||
[HideInInspector] public List<Beatmap.Entity> playerEntities = new List<Beatmap.Entity>();
|
[HideInInspector] public List<DynamicBeatmap.DynamicEntity> playerEntities = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
private List<GameObject> preloadedGames = new List<GameObject>();
|
private List<GameObject> preloadedGames = new List<GameObject>();
|
||||||
public List<GameObject> SoundObjects = new List<GameObject>();
|
public List<GameObject> SoundObjects = new List<GameObject>();
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ namespace HeavenStudio
|
||||||
if (txt != null)
|
if (txt != null)
|
||||||
{
|
{
|
||||||
string json = txt.text;
|
string json = txt.text;
|
||||||
Beatmap = JsonConvert.DeserializeObject<Beatmap>(json);
|
Beatmap = JsonConvert.DeserializeObject<DynamicBeatmap>(json);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -116,20 +116,33 @@ namespace HeavenStudio
|
||||||
|
|
||||||
public void NewRemix()
|
public void NewRemix()
|
||||||
{
|
{
|
||||||
Beatmap = new Beatmap();
|
Beatmap = new DynamicBeatmap();
|
||||||
Beatmap.bpm = 120f;
|
Beatmap.bpm = 120f;
|
||||||
Beatmap.musicVolume = 100;
|
Beatmap.musicVolume = 100;
|
||||||
Beatmap.firstBeatOffset = 0f;
|
Beatmap.firstBeatOffset = 0f;
|
||||||
Conductor.instance.musicSource.clip = null;
|
Conductor.instance.musicSource.clip = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadRemix(string json = "")
|
public void LoadRemix(string json = "", string type = "riq", int version = 0)
|
||||||
{
|
{
|
||||||
SortEventsList();
|
SortEventsList();
|
||||||
|
|
||||||
if (json != "")
|
if (json != "")
|
||||||
{
|
{
|
||||||
Beatmap = JsonConvert.DeserializeObject<Beatmap>(json);
|
switch (type)
|
||||||
|
{
|
||||||
|
case "tengoku":
|
||||||
|
case "rhmania":
|
||||||
|
Beatmap toConvert = JsonConvert.DeserializeObject<Beatmap>(json);
|
||||||
|
Beatmap = DynamicBeatmap.BeatmapConverter(toConvert);
|
||||||
|
break;
|
||||||
|
case "riq":
|
||||||
|
Beatmap = JsonConvert.DeserializeObject<DynamicBeatmap>(json);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
NewRemix();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -213,7 +226,7 @@ namespace HeavenStudio
|
||||||
// Debug.Log("Checking Tempo Change at " + tempoChanges[currentTempoEvent] + ", current beat " + Conductor.instance.songPositionInBeats);
|
// Debug.Log("Checking Tempo Change at " + tempoChanges[currentTempoEvent] + ", current beat " + Conductor.instance.songPositionInBeats);
|
||||||
if (Conductor.instance.songPositionInBeats >= tempoChanges[currentTempoEvent])
|
if (Conductor.instance.songPositionInBeats >= tempoChanges[currentTempoEvent])
|
||||||
{
|
{
|
||||||
// Debug.Log("Tempo Change at " + Conductor.instance.songPositionInBeats + " of bpm " + Beatmap.tempoChanges[currentTempoEvent].tempo);
|
// Debug.Log("Tempo Change at " + Conductor.instance.songPositionInBeats + " of bpm " + DynamicBeatmap.tempoChanges[currentTempoEvent].tempo);
|
||||||
Conductor.instance.SetBpm(Beatmap.tempoChanges[currentTempoEvent].tempo);
|
Conductor.instance.SetBpm(Beatmap.tempoChanges[currentTempoEvent].tempo);
|
||||||
Conductor.instance.timeSinceLastTempoChange = Time.time;
|
Conductor.instance.timeSinceLastTempoChange = Time.time;
|
||||||
currentTempoEvent++;
|
currentTempoEvent++;
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
new GameAction("set distance", "Set Distance")
|
new GameAction("set distance", "Set Distance")
|
||||||
{
|
{
|
||||||
function = delegate { AirRally.instance.SetDistance(e.currentEntity.type); },
|
function = delegate { AirRally.instance.SetDistance(e.currentEntity["type"]); },
|
||||||
defaultLength = .5f,
|
defaultLength = .5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
//new GameAction("start rally", delegate { AirRally.instance.StartRally(true); }, .5f, false),
|
//new GameAction("start rally", delegate { AirRally.instance.StartRally(true); }, .5f, false),
|
||||||
new GameAction("rally", "Rally")
|
new GameAction("rally", "Rally")
|
||||||
{
|
{
|
||||||
function = delegate { AirRally.instance.Rally(e.currentEntity.beat, e.currentEntity.toggle, e.currentEntity.length); },
|
function = delegate { AirRally.instance.Rally(e.currentEntity.beat, e.currentEntity["toggle"], e.currentEntity.length); },
|
||||||
defaultLength = 2f,
|
defaultLength = 2f,
|
||||||
resizable = true,
|
resizable = true,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
|
@ -38,7 +38,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("ba bum bum bum", "Ba Bum Bum Bum")
|
new GameAction("ba bum bum bum", "Ba Bum Bum Bum")
|
||||||
{
|
{
|
||||||
function = delegate { AirRally.instance.BaBumBumBum(e.currentEntity.beat, e.currentEntity.toggle, e.currentEntity.type); },
|
function = delegate { AirRally.instance.BaBumBumBum(e.currentEntity.beat, e.currentEntity["toggle"], e.currentEntity["type"]); },
|
||||||
defaultLength = 7f,
|
defaultLength = 7f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("forthington voice lines", "Forthington Voice Lines")
|
new GameAction("forthington voice lines", "Forthington Voice Lines")
|
||||||
{
|
{
|
||||||
function = delegate { AirRally.instance.ForthVoice(e.currentEntity.type, e.currentEntity.type2); },
|
function = delegate { AirRally.instance.ForthVoice(e.currentEntity["type"], e.currentEntity["type2"]); },
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("type", AirRally.CountSound.one, "Type", "The number Forthington will say"),
|
new Param("type", AirRally.CountSound.one, "Type", "The number Forthington will say"),
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("play piano", "Play Note")
|
new GameAction("play piano", "Play Note")
|
||||||
{
|
{
|
||||||
function = delegate { BuiltToScaleDS.instance.PlayPiano(eventCaller.currentEntity.beat, eventCaller.currentEntity.length, eventCaller.currentEntity.type); },
|
function = delegate { BuiltToScaleDS.instance.PlayPiano(eventCaller.currentEntity.beat, eventCaller.currentEntity.length, eventCaller.currentEntity["type"]); },
|
||||||
resizable = true,
|
resizable = true,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -87,7 +87,7 @@ namespace HeavenStudio.Games
|
||||||
elevatorAnim.Play("MakeRod", 0, 1f);
|
elevatorAnim.Play("MakeRod", 0, 1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Beatmap.Entity> spawnedBlockEvents = new List<Beatmap.Entity>();
|
List<DynamicBeatmap.DynamicEntity> spawnedBlockEvents = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
if (!Conductor.instance.isPlaying && !Conductor.instance.isPaused)
|
if (!Conductor.instance.isPlaying && !Conductor.instance.isPaused)
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("prepare", "Prepare Stance")
|
new GameAction("prepare", "Prepare Stance")
|
||||||
{
|
{
|
||||||
function = delegate { ClappyTrio.instance.Prepare(eventCaller.currentEntity.toggle ? 3 : 0); },
|
function = delegate { ClappyTrio.instance.Prepare(eventCaller.currentEntity["toggle"] ? 3 : 0); },
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("toggle", false, "Alt", "Whether or not the alternate version should be played")
|
new Param("toggle", false, "Alt", "Whether or not the alternate version should be played")
|
||||||
|
@ -31,7 +31,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("change lion count", "Change Lion Count")
|
new GameAction("change lion count", "Change Lion Count")
|
||||||
{
|
{
|
||||||
function = delegate { ClappyTrio.instance.ChangeLionCount((int)eventCaller.currentEntity.valA); },
|
function = delegate { ClappyTrio.instance.ChangeLionCount((int)eventCaller.currentEntity["valA"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -79,7 +79,7 @@ namespace HeavenStudio.Games
|
||||||
}
|
}
|
||||||
public override void OnGameSwitch(float beat)
|
public override void OnGameSwitch(float beat)
|
||||||
{
|
{
|
||||||
Beatmap.Entity changeLion = GameManager.instance.Beatmap.entities.FindLast(c => c.datamodel == "clappyTrio/change lion count" && c.beat <= beat);
|
DynamicBeatmap.DynamicEntity changeLion = GameManager.instance.Beatmap.entities.FindLast(c => c.datamodel == "clappyTrio/change lion count" && c.beat <= beat);
|
||||||
if(changeLion != null)
|
if(changeLion != null)
|
||||||
{
|
{
|
||||||
EventCaller.instance.CallEvent(changeLion, true);
|
EventCaller.instance.CallEvent(changeLion, true);
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
new GameAction("toss", "Toss Coin")
|
new GameAction("toss", "Toss Coin")
|
||||||
{
|
{
|
||||||
function = delegate { CoinToss.instance.TossCoin(eventCaller.currentEntity.beat, eventCaller.currentEntity.toggle); },
|
function = delegate { CoinToss.instance.TossCoin(eventCaller.currentEntity.beat, eventCaller.currentEntity["toggle"]); },
|
||||||
defaultLength = 7,
|
defaultLength = 7,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("set background color", "Set Background Color")
|
new GameAction("set background color", "Set Background Color")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; CoinToss.instance.ChangeBackgroundColor(e.colorA, 0f); CoinToss.instance.ChangeBackgroundColor(e.colorB, 0f, true); },
|
function = delegate { var e = eventCaller.currentEntity; CoinToss.instance.ChangeBackgroundColor(e["colorA"], 0f); CoinToss.instance.ChangeBackgroundColor(e["colorB"], 0f, true); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("fade background color", "Fade Background Color")
|
new GameAction("fade background color", "Fade Background Color")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; CoinToss.instance.FadeBackgroundColor(e.colorA, e.colorB, e.length); CoinToss.instance.FadeBackgroundColor(e.colorC, e.colorD, e.length, true); },
|
function = delegate { var e = eventCaller.currentEntity; CoinToss.instance.FadeBackgroundColor(e["colorA"], e["colorB"], e.length); CoinToss.instance.FadeBackgroundColor(e["colorC"], e["colorD"], e.length, true); },
|
||||||
resizable = true,
|
resizable = true,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -49,7 +49,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
//left in for backwards-compatibility, but cannot be placed
|
//left in for backwards-compatibility, but cannot be placed
|
||||||
new GameAction("set foreground color", "")
|
new GameAction("set foreground color", "")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; CoinToss.instance.ChangeBackgroundColor(e.colorA, 0f, true); },
|
function = delegate { var e = eventCaller.currentEntity; CoinToss.instance.ChangeBackgroundColor(e["colorA"], 0f, true); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>
|
parameters = new List<Param>
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
|
|
||||||
new GameAction("fade foreground color", "")
|
new GameAction("fade foreground color", "")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; CoinToss.instance.FadeBackgroundColor(e.colorA, e.colorB, e.length, true); },
|
function = delegate { var e = eventCaller.currentEntity; CoinToss.instance.FadeBackgroundColor(e["colorA"], e["colorB"], e.length, true); },
|
||||||
resizable = true,
|
resizable = true,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
|
|
@ -174,7 +174,7 @@ namespace HeavenStudio.Games
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Beatmap.Entity> cuedMoleSounds = new List<Beatmap.Entity>();
|
List<DynamicBeatmap.DynamicEntity> cuedMoleSounds = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
var cond = Conductor.instance;
|
var cond = Conductor.instance;
|
||||||
|
@ -329,7 +329,7 @@ namespace HeavenStudio.Games
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
inactiveStart = beat;
|
inactiveStart = beat;
|
||||||
Beatmap.Entity gameSwitch = GameManager.instance.Beatmap.entities.Find(c => c.beat >= beat && c.datamodel == "gameManager/switchGame/cropStomp");
|
DynamicBeatmap.DynamicEntity gameSwitch = GameManager.instance.Beatmap.entities.Find(c => c.beat >= beat && c.datamodel == "gameManager/switchGame/cropStomp");
|
||||||
if (gameSwitch == null)
|
if (gameSwitch == null)
|
||||||
return;
|
return;
|
||||||
int length = Mathf.CeilToInt((gameSwitch.beat - beat)/2);
|
int length = Mathf.CeilToInt((gameSwitch.beat - beat)/2);
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
new GameAction("bop", "Bop")
|
new GameAction("bop", "Bop")
|
||||||
{
|
{
|
||||||
function = delegate { DJSchool.instance.Bop(eventCaller.currentEntity.toggle); },
|
function = delegate { DJSchool.instance.Bop(eventCaller.currentEntity["toggle"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -23,9 +23,9 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("and stop ooh", "And Stop!")
|
new GameAction("and stop ooh", "And Stop!")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; DJSchool.instance.AndStop(e.beat, e.toggle); },
|
function = delegate { var e = eventCaller.currentEntity; DJSchool.instance.AndStop(e.beat, e["toggle"]); },
|
||||||
defaultLength = 2.5f,
|
defaultLength = 2.5f,
|
||||||
inactiveFunction = delegate { var e = eventCaller.currentEntity; DJSchool.WarnAndStop(e.beat, e.toggle); },
|
inactiveFunction = delegate { var e = eventCaller.currentEntity; DJSchool.WarnAndStop(e.beat, e["toggle"]); },
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("toggle", true, "Ooh", "Whether or not the \"ooh\" sound should be played")
|
new Param("toggle", true, "Ooh", "Whether or not the \"ooh\" sound should be played")
|
||||||
|
@ -33,9 +33,9 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("break c'mon ooh", "Break, C'mon!")
|
new GameAction("break c'mon ooh", "Break, C'mon!")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; DJSchool.instance.BreakCmon(e.beat, e.type, e.toggle); },
|
function = delegate { var e = eventCaller.currentEntity; DJSchool.instance.BreakCmon(e.beat, e["type"], e["toggle"]); },
|
||||||
defaultLength = 3f,
|
defaultLength = 3f,
|
||||||
inactiveFunction = delegate { var e = eventCaller.currentEntity; DJSchool.WarnBreakCmon(e.beat, e.type, e.toggle); },
|
inactiveFunction = delegate { var e = eventCaller.currentEntity; DJSchool.WarnBreakCmon(e.beat, e["type"], e["toggle"]); },
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("type", DJSchool.DJVoice.Standard, "Voice", "The voice line to play"),
|
new Param("type", DJSchool.DJVoice.Standard, "Voice", "The voice line to play"),
|
||||||
|
@ -44,7 +44,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("scratch-o hey", "Scratch-o")
|
new GameAction("scratch-o hey", "Scratch-o")
|
||||||
{
|
{
|
||||||
function = delegate { DJSchool.instance.ScratchoHey(eventCaller.currentEntity.beat, eventCaller.currentEntity.type, eventCaller.currentEntity.toggle); },
|
function = delegate { DJSchool.instance.ScratchoHey(eventCaller.currentEntity.beat, eventCaller.currentEntity["type"], eventCaller.currentEntity["toggle"]); },
|
||||||
defaultLength = 3f,
|
defaultLength = 3f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -54,9 +54,9 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("dj voice lines", "DJ Yellow Banter")
|
new GameAction("dj voice lines", "DJ Yellow Banter")
|
||||||
{
|
{
|
||||||
function = delegate { DJSchool.instance.voiceLines(eventCaller.currentEntity.beat, eventCaller.currentEntity.type); },
|
function = delegate { DJSchool.instance.voiceLines(eventCaller.currentEntity.beat, eventCaller.currentEntity["type"]); },
|
||||||
defaultLength = 2f,
|
defaultLength = 2f,
|
||||||
inactiveFunction = delegate { DJSchool.WarnDJVoiceLines(eventCaller.currentEntity.beat, eventCaller.currentEntity.type); },
|
inactiveFunction = delegate { DJSchool.WarnDJVoiceLines(eventCaller.currentEntity.beat, eventCaller.currentEntity["type"]); },
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("type", DJSchool.DJVoiceLines.CheckItOut, "Voice Lines", "The voice line to play"),
|
new Param("type", DJSchool.DJVoiceLines.CheckItOut, "Voice Lines", "The voice line to play"),
|
||||||
|
@ -64,7 +64,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("sound FX", "Scratchy Music")
|
new GameAction("sound FX", "Scratchy Music")
|
||||||
{
|
{
|
||||||
function = delegate { DJSchool.instance.soundFX(eventCaller.currentEntity.toggle); },
|
function = delegate { DJSchool.instance.soundFX(eventCaller.currentEntity["toggle"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("drum", "Hit Drum")
|
new GameAction("drum", "Hit Drum")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; DrummingPractice.instance.Prepare(e.beat, e.toggle); },
|
function = delegate { var e = eventCaller.currentEntity; DrummingPractice.instance.Prepare(e.beat, e["toggle"]); },
|
||||||
defaultLength = 2f,
|
defaultLength = 2f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("set mii", "Set Miis")
|
new GameAction("set mii", "Set Miis")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; DrummingPractice.instance.SetMiis(e.type, e.type2, e.type3, e.toggle); },
|
function = delegate { var e = eventCaller.currentEntity; DrummingPractice.instance.SetMiis(e["type"], e["type2"], e["type3"], e["toggle"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("set background color", "Set Background Color")
|
new GameAction("set background color", "Set Background Color")
|
||||||
{
|
{
|
||||||
function = delegate {var e = eventCaller.currentEntity; DrummingPractice.instance.SetBackgroundColor(e.colorA, e.colorB, e.colorC); },
|
function = delegate {var e = eventCaller.currentEntity; DrummingPractice.instance.SetBackgroundColor(e["colorA"], e["colorB"], e["colorC"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -100,7 +100,7 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
public override void OnGameSwitch(float beat)
|
public override void OnGameSwitch(float beat)
|
||||||
{
|
{
|
||||||
Beatmap.Entity changeMii = GameManager.instance.Beatmap.entities.FindLast(c => c.datamodel == "drummingPractice/set mii" && c.beat <= beat);
|
var changeMii = GameManager.instance.Beatmap.entities.FindLast(c => c.datamodel == "drummingPractice/set mii" && c.beat <= beat);
|
||||||
if(changeMii != null)
|
if(changeMii != null)
|
||||||
{
|
{
|
||||||
EventCaller.instance.CallEvent(changeMii, true);
|
EventCaller.instance.CallEvent(changeMii, true);
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
new GameAction("bop", "Bop")
|
new GameAction("bop", "Bop")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; FanClub.instance.Bop(e.beat, e.length, e.type); },
|
function = delegate { var e = eventCaller.currentEntity; FanClub.instance.Bop(e.beat, e.length, e["type"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
resizable = true,
|
resizable = true,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
|
@ -25,38 +25,38 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("yeah, yeah, yeah", "Yeah, Yeah, Yeah!")
|
new GameAction("yeah, yeah, yeah", "Yeah, Yeah, Yeah!")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; FanClub.instance.CallHai(e.beat, e.toggle); },
|
function = delegate { var e = eventCaller.currentEntity; FanClub.instance.CallHai(e.beat, e["toggle"]); },
|
||||||
defaultLength = 8,
|
defaultLength = 8,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("toggle", false, "Disable call", "Disable the idol's call")
|
new Param("toggle", false, "Disable call", "Disable the idol's call")
|
||||||
},
|
},
|
||||||
inactiveFunction = delegate { var e = eventCaller.currentEntity; FanClub.WarnHai(e.beat, e.toggle);}
|
inactiveFunction = delegate { var e = eventCaller.currentEntity; FanClub.WarnHai(e.beat, e["toggle"]);}
|
||||||
},
|
},
|
||||||
new GameAction("I suppose", "I Suppose!")
|
new GameAction("I suppose", "I Suppose!")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; FanClub.instance.CallKamone(e.beat, e.toggle, 0, e.type); },
|
function = delegate { var e = eventCaller.currentEntity; FanClub.instance.CallKamone(e.beat, e["toggle"], 0, e["type"]); },
|
||||||
defaultLength = 6,
|
defaultLength = 6,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("type", FanClub.KamoneResponseType.Through, "Response type", "Type of response to use"),
|
new Param("type", FanClub.KamoneResponseType.Through, "Response type", "Type of response to use"),
|
||||||
new Param("toggle", false, "Disable call", "Disable the idol's call")
|
new Param("toggle", false, "Disable call", "Disable the idol's call")
|
||||||
},
|
},
|
||||||
inactiveFunction = delegate { var e = eventCaller.currentEntity; FanClub.WarnKamone(e.beat, e.toggle, 0, e.type);}
|
inactiveFunction = delegate { var e = eventCaller.currentEntity; FanClub.WarnKamone(e.beat, e["toggle"], 0, e["type"]);}
|
||||||
},
|
},
|
||||||
new GameAction("double clap", "Double Clap")
|
new GameAction("double clap", "Double Clap")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; FanClub.instance.CallBigReady(e.beat, e.toggle); },
|
function = delegate { var e = eventCaller.currentEntity; FanClub.instance.CallBigReady(e.beat, e["toggle"]); },
|
||||||
defaultLength = 4,
|
defaultLength = 4,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("toggle", false, "Disable call", "Disable the call")
|
new Param("toggle", false, "Disable call", "Disable the call")
|
||||||
},
|
},
|
||||||
inactiveFunction = delegate { var e = eventCaller.currentEntity; FanClub.WarnBigReady(e.beat, e.toggle); }
|
inactiveFunction = delegate { var e = eventCaller.currentEntity; FanClub.WarnBigReady(e.beat, e["toggle"]); }
|
||||||
},
|
},
|
||||||
new GameAction("play idol animation", "Idol Coreography")
|
new GameAction("play idol animation", "Idol Coreography")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; FanClub.instance.PlayAnim(e.beat, e.length, e.type); },
|
function = delegate { var e = eventCaller.currentEntity; FanClub.instance.PlayAnim(e.beat, e.length, e["type"]); },
|
||||||
resizable = true,
|
resizable = true,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("play stage animation", "Stage Coreography")
|
new GameAction("play stage animation", "Stage Coreography")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; FanClub.instance.PlayAnimStage(e.beat, e.type); },
|
function = delegate { var e = eventCaller.currentEntity; FanClub.instance.PlayAnimStage(e.beat, e["type"]); },
|
||||||
resizable = true,
|
resizable = true,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -75,13 +75,13 @@ namespace HeavenStudio.Games.Loaders
|
||||||
new GameAction("set performance type", "Coreography Type")
|
new GameAction("set performance type", "Coreography Type")
|
||||||
{
|
{
|
||||||
|
|
||||||
function = delegate { var e = eventCaller.currentEntity; FanClub.SetPerformanceType(e.type);},
|
function = delegate { var e = eventCaller.currentEntity; FanClub.SetPerformanceType(e["type"]);},
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("type", FanClub.IdolPerformanceType.Normal, "Performance Type", "Set of animations for the idol to use")
|
new Param("type", FanClub.IdolPerformanceType.Normal, "Performance Type", "Set of animations for the idol to use")
|
||||||
},
|
},
|
||||||
inactiveFunction = delegate { var e = eventCaller.currentEntity; FanClub.SetPerformanceType(e.type); }
|
inactiveFunction = delegate { var e = eventCaller.currentEntity; FanClub.SetPerformanceType(e["type"]); }
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
new List<string>() {"ntr", "normal"},
|
new List<string>() {"ntr", "normal"},
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("alien speak", "Alien Speak")
|
new GameAction("alien speak", "Alien Speak")
|
||||||
{
|
{
|
||||||
function = delegate { FirstContact.instance.alienSpeak(eventCaller.currentEntity.beat, eventCaller.currentEntity.valA); },
|
function = delegate { FirstContact.instance.alienSpeak(eventCaller.currentEntity.beat, eventCaller.currentEntity["valA"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("mission control", "Show Mission Control")
|
new GameAction("mission control", "Show Mission Control")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; FirstContact.instance.missionControlDisplay(e.beat, e.toggle, e.length); },
|
function = delegate { var e = eventCaller.currentEntity; FirstContact.instance.missionControlDisplay(e.beat, e["toggle"], e.length); },
|
||||||
resizable = true,
|
resizable = true,
|
||||||
parameters = new List<Param>
|
parameters = new List<Param>
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("look at", "Look At")
|
new GameAction("look at", "Look At")
|
||||||
{
|
{
|
||||||
function = delegate { FirstContact.instance.lookAtDirection(eventCaller.currentEntity.type, eventCaller.currentEntity.type); },
|
function = delegate { FirstContact.instance.lookAtDirection(eventCaller.currentEntity["type"], eventCaller.currentEntity["type"]); },
|
||||||
defaultLength = .5f,
|
defaultLength = .5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -56,7 +56,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("live bar beat", "Live Bar Beat")
|
new GameAction("live bar beat", "Live Bar Beat")
|
||||||
{
|
{
|
||||||
function = delegate { FirstContact.instance.liveBarBeat(eventCaller.currentEntity.toggle); },
|
function = delegate { FirstContact.instance.liveBarBeat(eventCaller.currentEntity["toggle"]); },
|
||||||
defaultLength = .5f,
|
defaultLength = .5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//new GameAction("Version of First Contact", delegate { FirstContact.instance.versionOfFirstContact(eventCaller.currentEntity.type); }, .5f, false, new List<Param>
|
//new GameAction("Version of First Contact", delegate { FirstContact.instance.versionOfFirstContact(eventCaller.currentEntity["type"]); }, .5f, false, new List<Param>
|
||||||
//{
|
//{
|
||||||
// new Param("type", FirstContact.VersionOfContact.FirstContact, "Version", "Version of First Contact to play"),
|
// new Param("type", FirstContact.VersionOfContact.FirstContact, "Version", "Version of First Contact to play"),
|
||||||
//}),
|
//}),
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
new GameAction("flick", "Flick Food")
|
new GameAction("flick", "Flick Food")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; ForkLifter.instance.Flick(e.beat, e.type); },
|
function = delegate { var e = eventCaller.currentEntity; ForkLifter.instance.Flick(e.beat, e["type"]); },
|
||||||
defaultLength = 3,
|
defaultLength = 3,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace HeavenStudio.Games.Global
|
||||||
|
|
||||||
[SerializeField] private Color currentCol;
|
[SerializeField] private Color currentCol;
|
||||||
|
|
||||||
private List<Beatmap.Entity> allFadeEvents = new List<Beatmap.Entity>();
|
private List<DynamicBeatmap.DynamicEntity> allFadeEvents = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ namespace HeavenStudio.Games.Global
|
||||||
|
|
||||||
if (allFadeEvents.Count > 0)
|
if (allFadeEvents.Count > 0)
|
||||||
{
|
{
|
||||||
Beatmap.Entity startEntity = null;
|
DynamicBeatmap.DynamicEntity startEntity = null;
|
||||||
|
|
||||||
for (int i = 0; i < allFadeEvents.Count; i++)
|
for (int i = 0; i < allFadeEvents.Count; i++)
|
||||||
{
|
{
|
||||||
|
@ -85,14 +85,14 @@ namespace HeavenStudio.Games.Global
|
||||||
{
|
{
|
||||||
if (!override_)
|
if (!override_)
|
||||||
{
|
{
|
||||||
Color colA = startEntity.colorA;
|
Color colA = startEntity["colorA"];
|
||||||
Color colB = startEntity.colorB;
|
Color colB = startEntity["colorB"];
|
||||||
|
|
||||||
startCol = new Color(colA.r, colA.g, colA.b, startEntity.valA);
|
startCol = new Color(colA.r, colA.g, colA.b, startEntity["valA"]);
|
||||||
endCol = new Color(colB.r, colB.g, colB.b, startEntity.valB);
|
endCol = new Color(colB.r, colB.g, colB.b, startEntity["valB"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetFade(startEntity.beat, startEntity.length, startCol, endCol, startEntity.ease);
|
SetFade(startEntity.beat, startEntity.length, startCol, endCol, startEntity["ease"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,10 +27,10 @@ namespace HeavenStudio.Games.Global
|
||||||
Bottom,
|
Bottom,
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Beatmap.Entity> textboxEvents = new List<Beatmap.Entity>();
|
private List<DynamicBeatmap.DynamicEntity> textboxEvents = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
private List<Beatmap.Entity> openCaptionsEvents = new List<Beatmap.Entity>();
|
private List<DynamicBeatmap.DynamicEntity> openCaptionsEvents = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
private List<Beatmap.Entity> idolEvents = new List<Beatmap.Entity>();
|
private List<DynamicBeatmap.DynamicEntity> idolEvents = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
private List<Beatmap.Entity> closedCaptionsEvents = new List<Beatmap.Entity>();
|
private List<DynamicBeatmap.DynamicEntity> closedCaptionsEvents = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
|
|
||||||
Textbox instance;
|
Textbox instance;
|
||||||
|
|
||||||
|
@ -114,11 +114,11 @@ namespace HeavenStudio.Games.Global
|
||||||
if (prog >= 0f && prog <= 1f)
|
if (prog >= 0f && prog <= 1f)
|
||||||
{
|
{
|
||||||
TextboxEnabler.SetActive(true);
|
TextboxEnabler.SetActive(true);
|
||||||
TextboxObject.SetText(e.text1);
|
TextboxObject.SetText(e["text1"]);
|
||||||
TextboxObject.Resize(e.valA, e.valB);
|
TextboxObject.Resize(e["valA"], e["valB"]);
|
||||||
|
|
||||||
// ouch
|
// ouch
|
||||||
switch (e.type)
|
switch (e["type"])
|
||||||
{
|
{
|
||||||
case (int) TextboxAnchor.TopLeft:
|
case (int) TextboxAnchor.TopLeft:
|
||||||
TextboxEnabler.transform.localPosition = new Vector3(-XAnchor, YAnchor);
|
TextboxEnabler.transform.localPosition = new Vector3(-XAnchor, YAnchor);
|
||||||
|
@ -170,12 +170,12 @@ namespace HeavenStudio.Games.Global
|
||||||
if (prog >= 0f && prog <= 1f)
|
if (prog >= 0f && prog <= 1f)
|
||||||
{
|
{
|
||||||
OpenCaptionsEnabler.SetActive(true);
|
OpenCaptionsEnabler.SetActive(true);
|
||||||
OpenCaptionsLabel.text = e.text1;
|
OpenCaptionsLabel.text = e["text1"];
|
||||||
|
|
||||||
OpenCaptionsLabelRect.sizeDelta = new Vector2(18f * e.valA, 2.5f * e.valB);
|
OpenCaptionsLabelRect.sizeDelta = new Vector2(18f * e["valA"], 2.5f * e["valB"]);
|
||||||
|
|
||||||
// ouch
|
// ouch
|
||||||
switch (e.type)
|
switch (e["type"])
|
||||||
{
|
{
|
||||||
case (int) TextboxAnchor.TopLeft:
|
case (int) TextboxAnchor.TopLeft:
|
||||||
OpenCaptionsEnabler.transform.localPosition = new Vector3(-XAnchor, YAnchor);
|
OpenCaptionsEnabler.transform.localPosition = new Vector3(-XAnchor, YAnchor);
|
||||||
|
@ -228,8 +228,8 @@ namespace HeavenStudio.Games.Global
|
||||||
if (prog >= 0f && prog <= 1f)
|
if (prog >= 0f && prog <= 1f)
|
||||||
{
|
{
|
||||||
float inp = cond.GetPositionFromBeat(e.beat, 1);
|
float inp = cond.GetPositionFromBeat(e.beat, 1);
|
||||||
IdolSongLabel.text = e.text1;
|
IdolSongLabel.text = e["text1"];
|
||||||
IdolArtistLabel.text = e.text2;
|
IdolArtistLabel.text = e["text2"];
|
||||||
|
|
||||||
IdolAnimator.Play("IdolShow", -1, Mathf.Min(inp, 1));
|
IdolAnimator.Play("IdolShow", -1, Mathf.Min(inp, 1));
|
||||||
IdolAnimator.speed = 0;
|
IdolAnimator.speed = 0;
|
||||||
|
@ -264,18 +264,18 @@ namespace HeavenStudio.Games.Global
|
||||||
if (prog >= 0f && prog <= 1f)
|
if (prog >= 0f && prog <= 1f)
|
||||||
{
|
{
|
||||||
ClosedCaptionsEnabler.SetActive(true);
|
ClosedCaptionsEnabler.SetActive(true);
|
||||||
ClosedCaptionsLabel.text = e.text1;
|
ClosedCaptionsLabel.text = e["text1"];
|
||||||
|
|
||||||
ClosedCaptionsLabelRect.sizeDelta = new Vector2(9f, e.valA);
|
ClosedCaptionsLabelRect.sizeDelta = new Vector2(9f, e["valA"]);
|
||||||
ClosedCaptionsBgRect.sizeDelta = new Vector2(9f, e.valA);
|
ClosedCaptionsBgRect.sizeDelta = new Vector2(9f, e["valA"]);
|
||||||
|
|
||||||
switch (e.type)
|
switch (e["type"])
|
||||||
{
|
{
|
||||||
case (int) ClosedCaptionsAnchor.Bottom:
|
case (int) ClosedCaptionsAnchor.Bottom:
|
||||||
ClosedCaptionsEnabler.transform.localPosition = new Vector3(0, -2.5f + e.valA/2);
|
ClosedCaptionsEnabler.transform.localPosition = new Vector3(0, -2.5f + e["valA"]/2);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ClosedCaptionsEnabler.transform.localPosition = new Vector3(0, 2.5f - e.valA/2);
|
ClosedCaptionsEnabler.transform.localPosition = new Vector3(0, 2.5f - e["valA"]/2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,16 +15,16 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
new GameAction("bop", "Bop")
|
new GameAction("bop", "Bop")
|
||||||
{
|
{
|
||||||
function = delegate { KarateMan.instance.ToggleBop(eventCaller.currentEntity.toggle); },
|
function = delegate { KarateMan.instance.ToggleBop(eventCaller.currentEntity["toggle"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("toggle", true, "Bop", "Whether to bop to the beat or not")
|
new Param("toggle", true, "Bop", "Whether to bop to the beat or not")
|
||||||
},
|
},
|
||||||
inactiveFunction = delegate { KarateMan.ToggleBopUnloaded(eventCaller.currentEntity.toggle); }
|
inactiveFunction = delegate { KarateMan.ToggleBopUnloaded(eventCaller.currentEntity["toggle"]); }
|
||||||
},
|
},
|
||||||
new GameAction("hit", "Toss Object") {
|
new GameAction("hit", "Toss Object") {
|
||||||
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.CreateItem(e.beat, e.type, e.type2); },
|
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.CreateItem(e.beat, e["type"], e["type2"]); },
|
||||||
defaultLength = 2,
|
defaultLength = 2,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("bulb", "Toss Lightbulb")
|
new GameAction("bulb", "Toss Lightbulb")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.CreateBulbSpecial(e.beat, e.type, e.colorA, e.type2); },
|
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.CreateBulbSpecial(e.beat, e["type"], e["colorA"], e["type2"]); },
|
||||||
defaultLength = 2,
|
defaultLength = 2,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -45,7 +45,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("kick", "Special: Kick")
|
new GameAction("kick", "Special: Kick")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.Kick(e.beat, e.toggle, e.type); },
|
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.Kick(e.beat, e["toggle"], e["type"]); },
|
||||||
defaultLength = 4f,
|
defaultLength = 4f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("combo", "Special: Combo")
|
new GameAction("combo", "Special: Combo")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.Combo(e.beat, e.type); },
|
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.Combo(e.beat, e["type"]); },
|
||||||
defaultLength = 4,
|
defaultLength = 4,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -64,24 +64,24 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("hitX", "Warnings")
|
new GameAction("hitX", "Warnings")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.DoWord(e.beat, e.type); },
|
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.DoWord(e.beat, e["type"]); },
|
||||||
defaultLength = 1f,
|
defaultLength = 1f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("type", KarateMan.HitThree.HitThree, "Type", "The warning text to show")
|
new Param("type", KarateMan.HitThree.HitThree, "Type", "The warning text to show")
|
||||||
},
|
},
|
||||||
inactiveFunction = delegate { var e = eventCaller.currentEntity; KarateMan.DoWordSound(e.beat, e.type); }
|
inactiveFunction = delegate { var e = eventCaller.currentEntity; KarateMan.DoWordSound(e.beat, e["type"]); }
|
||||||
},
|
},
|
||||||
new GameAction("special camera", "Special Camera")
|
new GameAction("special camera", "Special Camera")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; KarateMan.DoSpecialCamera(e.beat, e.length, e.toggle); },
|
function = delegate { var e = eventCaller.currentEntity; KarateMan.DoSpecialCamera(e.beat, e.length, e["toggle"]); },
|
||||||
defaultLength = 8f,
|
defaultLength = 8f,
|
||||||
resizable = true,
|
resizable = true,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("toggle", true, "Return Camera", "Camera zooms back in?"),
|
new Param("toggle", true, "Return Camera", "Camera zooms back in?"),
|
||||||
},
|
},
|
||||||
inactiveFunction = delegate { var e = eventCaller.currentEntity; KarateMan.DoSpecialCamera(e.beat, e.length, e.toggle); }
|
inactiveFunction = delegate { var e = eventCaller.currentEntity; KarateMan.DoSpecialCamera(e.beat, e.length, e["toggle"]); }
|
||||||
},
|
},
|
||||||
new GameAction("prepare", "Preparation Stance")
|
new GameAction("prepare", "Preparation Stance")
|
||||||
{
|
{
|
||||||
|
@ -90,7 +90,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("set gameplay modifiers", "Gameplay Modifiers")
|
new GameAction("set gameplay modifiers", "Gameplay Modifiers")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetGameplayMods(e.beat, e.type, e.toggle); },
|
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetGameplayMods(e.beat, e["type"], e["toggle"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -100,7 +100,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("set background effects", "Background Appearance")
|
new GameAction("set background effects", "Background Appearance")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetBgAndShadowCol(e.beat, e.length, e.type, e.type2, e.colorA, e.colorB, e.type3); KarateMan.instance.SetBgTexture(e.type4, e.type5, e.colorC, e.colorD); },
|
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetBgAndShadowCol(e.beat, e.length, e["type"], e["type2"], e["colorA"], e["colorB"], e["type3"]); KarateMan.instance.SetBgTexture(e["type4"], e["type5"], e["colorC"], e["colorD"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
resizable = true,
|
resizable = true,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
|
@ -116,11 +116,11 @@ namespace HeavenStudio.Games.Loaders
|
||||||
new Param("colorD", new Color(), "Fading Filter Color", "When using the Fade background effect, make filter colour fade to this colour"),
|
new Param("colorD", new Color(), "Fading Filter Color", "When using the Fade background effect, make filter colour fade to this colour"),
|
||||||
|
|
||||||
},
|
},
|
||||||
inactiveFunction = delegate { var e = eventCaller.currentEntity; KarateMan.SetBgEffectsUnloaded(e.beat, e.length, e.type, e.type2, e.colorA, e.colorB, e.type3, e.type4, e.type5, e.colorC, e.colorD); }
|
inactiveFunction = delegate { var e = eventCaller.currentEntity; KarateMan.SetBgEffectsUnloaded(e.beat, e.length, e["type"], e["type2"], e["colorA"], e["colorB"], e["type3"], e["type4"], e["type5"], e["colorC"], e["colorD"]); }
|
||||||
},
|
},
|
||||||
new GameAction("set object colors", "Object Colors")
|
new GameAction("set object colors", "Object Colors")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; KarateMan.UpdateMaterialColour(e.colorA, e.colorB, e.colorC); },
|
function = delegate { var e = eventCaller.currentEntity; KarateMan.UpdateMaterialColour(e["colorA"], e["colorB"], e["colorC"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -128,11 +128,11 @@ namespace HeavenStudio.Games.Loaders
|
||||||
new Param("colorB", new Color(0.81f,0.81f,0.81f,1), "Joe Highlight Color", "The color to use for Karate Joe's highlights"),
|
new Param("colorB", new Color(0.81f,0.81f,0.81f,1), "Joe Highlight Color", "The color to use for Karate Joe's highlights"),
|
||||||
new Param("colorC", new Color(1,1,1,1), "Item Color", "The color to use for the thrown items"),
|
new Param("colorC", new Color(1,1,1,1), "Item Color", "The color to use for the thrown items"),
|
||||||
},
|
},
|
||||||
inactiveFunction = delegate { var e = eventCaller.currentEntity; KarateMan.UpdateMaterialColour(e.colorA, e.colorB, e.colorC); }
|
inactiveFunction = delegate { var e = eventCaller.currentEntity; KarateMan.UpdateMaterialColour(e["colorA"], e["colorB"], e["colorC"]); }
|
||||||
},
|
},
|
||||||
new GameAction("particle effects", "Particle Effects")
|
new GameAction("particle effects", "Particle Effects")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetParticleEffect(e.beat, e.type, e.valA, e.valB); },
|
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetParticleEffect(e.beat, e["type"], e["valA"], e["valB"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -143,7 +143,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("force facial expression", "Set Facial Expression")
|
new GameAction("force facial expression", "Set Facial Expression")
|
||||||
{
|
{
|
||||||
function = delegate { KarateMan.instance.SetFaceExpression(eventCaller.currentEntity.type); },
|
function = delegate { KarateMan.instance.SetFaceExpression(eventCaller.currentEntity["type"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -188,7 +188,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("hit3", "")
|
new GameAction("hit3", "")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.DoWord(e.beat, e.type); },
|
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.DoWord(e.beat, e["type"]); },
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("type", KarateMan.HitThree.HitThree, "Type", "The warning text to show")
|
new Param("type", KarateMan.HitThree.HitThree, "Type", "The warning text to show")
|
||||||
|
@ -203,7 +203,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
new GameAction("set background color", "")
|
new GameAction("set background color", "")
|
||||||
{
|
{
|
||||||
|
|
||||||
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetBgAndShadowCol(e.beat, e.length, e.type, e.type2, e.colorA, e.colorB, (int) KarateMan.currentBgEffect); },
|
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetBgAndShadowCol(e.beat, e.length, e["type"], e["type2"], e["colorA"], e["colorB"], (int) KarateMan.currentBgEffect); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -217,7 +217,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("set background fx", "")
|
new GameAction("set background fx", "")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetBgFx(e.type, e.beat, e.length); },
|
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetBgFx(e["type"], e.beat, e.length); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -228,7 +228,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
|
|
||||||
new GameAction("set background texture", "")
|
new GameAction("set background texture", "")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetBgTexture(e.type, e.type2, e.colorA, e.colorB); },
|
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetBgTexture(e["type"], e["type2"], e["colorA"], e["colorB"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -542,8 +542,8 @@ namespace HeavenStudio.Games
|
||||||
BGEffect.transform.position = new Vector3(GameCamera.instance.transform.position.x, GameCamera.instance.transform.position.y, 0);
|
BGEffect.transform.position = new Vector3(GameCamera.instance.transform.position.x, GameCamera.instance.transform.position.y, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Beatmap.Entity> allHits = new List<Beatmap.Entity>();
|
static List<DynamicBeatmap.DynamicEntity> allHits = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
static List<Beatmap.Entity> allEnds = new List<Beatmap.Entity>();
|
static List<DynamicBeatmap.DynamicEntity> allEnds = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
public static int CountHitsToEnd(float fromBeat)
|
public static int CountHitsToEnd(float fromBeat)
|
||||||
{
|
{
|
||||||
allHits = EventCaller.GetAllInGameManagerList("karateman", new string[] { "hit", "bulb", "kick", "combo" });
|
allHits = EventCaller.GetAllInGameManagerList("karateman", new string[] { "hit", "bulb", "kick", "combo" });
|
||||||
|
@ -554,7 +554,7 @@ namespace HeavenStudio.Games
|
||||||
float endBeat = Single.MaxValue;
|
float endBeat = Single.MaxValue;
|
||||||
|
|
||||||
//get the beat of the closest end event
|
//get the beat of the closest end event
|
||||||
foreach (Beatmap.Entity end in allEnds)
|
foreach (var end in allEnds)
|
||||||
{
|
{
|
||||||
if (end.beat > fromBeat)
|
if (end.beat > fromBeat)
|
||||||
{
|
{
|
||||||
|
@ -569,7 +569,7 @@ namespace HeavenStudio.Games
|
||||||
string type;
|
string type;
|
||||||
for (int i = 0; i < allHits.Count; i++)
|
for (int i = 0; i < allHits.Count; i++)
|
||||||
{
|
{
|
||||||
Beatmap.Entity h = allHits[i];
|
var h = allHits[i];
|
||||||
if (h.beat >= fromBeat)
|
if (h.beat >= fromBeat)
|
||||||
{
|
{
|
||||||
if (h.beat < endBeat)
|
if (h.beat < endBeat)
|
||||||
|
@ -806,8 +806,8 @@ namespace HeavenStudio.Games
|
||||||
var e = bgfx[i];
|
var e = bgfx[i];
|
||||||
if (e.beat > beat)
|
if (e.beat > beat)
|
||||||
break;
|
break;
|
||||||
SetBgAndShadowCol(e.beat, e.length, e.type, e.type2, e.colorA, e.colorB, e.type3);
|
SetBgAndShadowCol(e.beat, e.length, e["type"], e["type2"], e["colorA"], e["colorB"], e["type3"]);
|
||||||
SetBgTexture(e.type4, e.type5, e.colorC, e.colorD);
|
SetBgTexture(e["type4"], e["type5"], e["colorC"], e["colorD"]);
|
||||||
}
|
}
|
||||||
var camfx = GameManager.instance.Beatmap.entities.FindAll(en => en.datamodel == "karateman/special camera");
|
var camfx = GameManager.instance.Beatmap.entities.FindAll(en => en.datamodel == "karateman/special camera");
|
||||||
for (int i = 0; i < camfx.Count; i++)
|
for (int i = 0; i < camfx.Count; i++)
|
||||||
|
@ -815,7 +815,7 @@ namespace HeavenStudio.Games
|
||||||
var e = camfx[i];
|
var e = camfx[i];
|
||||||
if (e.beat > beat)
|
if (e.beat > beat)
|
||||||
break;
|
break;
|
||||||
DoSpecialCamera(e.beat, e.length, e.toggle);
|
DoSpecialCamera(e.beat, e.length, e["toggle"]);
|
||||||
}
|
}
|
||||||
// has issues when creating a new hitx entity so this is deactivated for now
|
// has issues when creating a new hitx entity so this is deactivated for now
|
||||||
// var hitx = GameManager.instance.Beatmap.entities.FindAll(en => en.datamodel == "karateman/hitX");
|
// var hitx = GameManager.instance.Beatmap.entities.FindAll(en => en.datamodel == "karateman/hitX");
|
||||||
|
@ -825,7 +825,7 @@ namespace HeavenStudio.Games
|
||||||
// if (e.beat > beat)
|
// if (e.beat > beat)
|
||||||
// break;
|
// break;
|
||||||
// Debug.Log("hitx");
|
// Debug.Log("hitx");
|
||||||
// DoWord(e.beat, e.type, false);
|
// DoWord(e.beat, e["type"], false);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("ding!", "Finish Stepping")
|
new GameAction("ding!", "Finish Stepping")
|
||||||
{
|
{
|
||||||
function = delegate { MrUpbeat.instance.Ding(eventCaller.currentEntity.toggle); },
|
function = delegate { MrUpbeat.instance.Ding(eventCaller.currentEntity["toggle"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -82,7 +82,7 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
List<Beatmap.Entity> gos = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "mrUpbeat/go");
|
List<DynamicBeatmap.DynamicEntity> gos = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "mrUpbeat/go");
|
||||||
for (int i = 0; i < gos.Count; i++)
|
for (int i = 0; i < gos.Count; i++)
|
||||||
{
|
{
|
||||||
if ((gos[i].beat - 0.15f) <= Conductor.instance.songPositionInBeats && (gos[i].beat + gos[i].length) - 0.15f > Conductor.instance.songPositionInBeats)
|
if ((gos[i].beat - 0.15f) <= Conductor.instance.songPositionInBeats && (gos[i].beat + gos[i].length) - 0.15f > Conductor.instance.songPositionInBeats)
|
||||||
|
@ -118,7 +118,7 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
public override void OnGameSwitch(float beat)
|
public override void OnGameSwitch(float beat)
|
||||||
{
|
{
|
||||||
foreach (Beatmap.Entity entity in GameManager.instance.Beatmap.entities)
|
foreach (var entity in GameManager.instance.Beatmap.entities)
|
||||||
{
|
{
|
||||||
if (entity.beat > beat) //the list is sorted based on the beat of the entity, so this should work fine.
|
if (entity.beat > beat) //the list is sorted based on the beat of the entity, so this should work fine.
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,14 +30,14 @@ namespace HeavenStudio.Games.Loaders
|
||||||
//idem
|
//idem
|
||||||
new GameAction("slumber", "Slumber")
|
new GameAction("slumber", "Slumber")
|
||||||
{
|
{
|
||||||
function = delegate {var e = eventCaller.currentEntity; PajamaParty.instance.DoSleepSequence(e.beat, e.toggle, e.type);},
|
function = delegate {var e = eventCaller.currentEntity; PajamaParty.instance.DoSleepSequence(e.beat, e["toggle"], e["type"]);},
|
||||||
defaultLength = 8f,
|
defaultLength = 8f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("type", PajamaParty.SleepType.Normal, "Sleep Type", "Type of sleep action to use"),
|
new Param("type", PajamaParty.SleepType.Normal, "Sleep Type", "Type of sleep action to use"),
|
||||||
new Param("toggle", false, "Alt. Animation", "Use an alternate animation for Mako")
|
new Param("toggle", false, "Alt. Animation", "Use an alternate animation for Mako")
|
||||||
},
|
},
|
||||||
inactiveFunction = delegate {var e = eventCaller.currentEntity; PajamaParty.WarnSleepSequence(e.beat, e.toggle);}
|
inactiveFunction = delegate {var e = eventCaller.currentEntity; PajamaParty.WarnSleepSequence(e.beat, e["toggle"]);}
|
||||||
},
|
},
|
||||||
new GameAction("throw", "Throw Pillows")
|
new GameAction("throw", "Throw Pillows")
|
||||||
{
|
{
|
||||||
|
|
|
@ -61,8 +61,8 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
function = delegate {
|
function = delegate {
|
||||||
var e = eventCaller.currentEntity;
|
var e = eventCaller.currentEntity;
|
||||||
var rotation = new Vector3(0, e.valA, 0);
|
var rotation = new Vector3(0, e["valA"], 0);
|
||||||
RhythmRally.instance.ChangeCameraAngle(rotation, e.valB, e.length, (Ease)e.type, (RotateMode)e.type2);
|
RhythmRally.instance.ChangeCameraAngle(rotation, e["valB"], e.length, (Ease)e["type"], (RotateMode)e["type2"]);
|
||||||
},
|
},
|
||||||
defaultLength = 4,
|
defaultLength = 4,
|
||||||
resizable = true,
|
resizable = true,
|
||||||
|
@ -259,7 +259,7 @@ namespace HeavenStudio.Games
|
||||||
// Check if the opponent should swing.
|
// Check if the opponent should swing.
|
||||||
if (!served && timeBeforeNextHit <= 0f)
|
if (!served && timeBeforeNextHit <= 0f)
|
||||||
{
|
{
|
||||||
List<Beatmap.Entity> rallies = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "rhythmRally/rally" || c.datamodel == "rhythmRally/slow rally");
|
var rallies = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "rhythmRally/rally" || c.datamodel == "rhythmRally/slow rally");
|
||||||
for (int i = 0; i < rallies.Count; i++)
|
for (int i = 0; i < rallies.Count; i++)
|
||||||
{
|
{
|
||||||
var rally = rallies[i];
|
var rally = rallies[i];
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("next vegetable", "Swap Vegetable")
|
new GameAction("next vegetable", "Swap Vegetable")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.NextVegetable(e.beat, e.type, e.colorA, e.colorB); },
|
function = delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.NextVegetable(e.beat, e["type"], e["colorA"], e["colorB"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -45,7 +45,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("change vegetable", "Change Vegetable (Instant)")
|
new GameAction("change vegetable", "Change Vegetable (Instant)")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.ChangeVegetableImmediate(e.type, e.colorA, e.colorB); },
|
function = delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.ChangeVegetableImmediate(e["type"], e["colorA"], e["colorB"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -66,7 +66,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("set background color", "Background Colour")
|
new GameAction("set background color", "Background Colour")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.ChangeBackgroundColor(e.colorA, 0f); },
|
function = delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.ChangeBackgroundColor(e["colorA"], 0f); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("fade background color", "Background Fade")
|
new GameAction("fade background color", "Background Fade")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.FadeBackgroundColor(e.colorA, e.colorB, e.length); },
|
function = delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.FadeBackgroundColor(e["colorA"], e["colorB"], e.length); },
|
||||||
resizable = true,
|
resizable = true,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
function = delegate
|
function = delegate
|
||||||
{
|
{
|
||||||
SamuraiSliceNtr.instance.ObjectIn(eventCaller.currentEntity.beat, eventCaller.currentEntity.type, (int) eventCaller.currentEntity.valA);
|
SamuraiSliceNtr.instance.ObjectIn(eventCaller.currentEntity.beat, eventCaller.currentEntity["type"], (int) eventCaller.currentEntity["valA"]);
|
||||||
},
|
},
|
||||||
defaultLength = 8,
|
defaultLength = 8,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Beatmap.Entity> highKicks = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "spaceSoccer/high kick-toe!");
|
var highKicks = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "spaceSoccer/high kick-toe!");
|
||||||
int numHighKicks = 0;
|
int numHighKicks = 0;
|
||||||
//determine what state the ball was in for the previous kick.
|
//determine what state the ball was in for the previous kick.
|
||||||
for(int i = 0; i < highKicks.Count; i++)
|
for(int i = 0; i < highKicks.Count; i++)
|
||||||
|
|
|
@ -183,7 +183,7 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
List<Beatmap.Entity> highKicks = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "spaceSoccer/high kick-toe!");
|
var highKicks = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "spaceSoccer/high kick-toe!");
|
||||||
for (int i = 0; i < highKicks.Count; i++)
|
for (int i = 0; i < highKicks.Count; i++)
|
||||||
{
|
{
|
||||||
if ((highKicks[i].beat - 0.15f) <= Conductor.instance.songPositionInBeats && highKicks[i].beat + 1f > Conductor.instance.songPositionInBeats)
|
if ((highKicks[i].beat - 0.15f) <= Conductor.instance.songPositionInBeats && highKicks[i].beat + 1f > Conductor.instance.songPositionInBeats)
|
||||||
|
|
|
@ -14,13 +14,13 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
new GameAction("ball dispense", "Ball Dispense")
|
new GameAction("ball dispense", "Ball Dispense")
|
||||||
{
|
{
|
||||||
function = delegate { SpaceSoccer.instance.Dispense(eventCaller.currentEntity.beat, !eventCaller.currentEntity.toggle); },
|
function = delegate { SpaceSoccer.instance.Dispense(eventCaller.currentEntity.beat, !eventCaller.currentEntity["toggle"]); },
|
||||||
defaultLength = 2f,
|
defaultLength = 2f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("toggle", false, "Disable Sound", "Disables the dispense sound")
|
new Param("toggle", false, "Disable Sound", "Disables the dispense sound")
|
||||||
},
|
},
|
||||||
inactiveFunction = delegate { if (!eventCaller.currentEntity.toggle) { SpaceSoccer.DispenseSound(eventCaller.currentEntity.beat); } }
|
inactiveFunction = delegate { if (!eventCaller.currentEntity["toggle"]) { SpaceSoccer.DispenseSound(eventCaller.currentEntity.beat); } }
|
||||||
},
|
},
|
||||||
new GameAction("high kick-toe!", "High Kick-Toe!")
|
new GameAction("high kick-toe!", "High Kick-Toe!")
|
||||||
{
|
{
|
||||||
|
@ -82,7 +82,7 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
public override void OnGameSwitch(float beat)
|
public override void OnGameSwitch(float beat)
|
||||||
{
|
{
|
||||||
foreach(Beatmap.Entity entity in GameManager.instance.Beatmap.entities)
|
foreach(var entity in GameManager.instance.Beatmap.entities)
|
||||||
{
|
{
|
||||||
if(entity.beat > beat) //the list is sorted based on the beat of the entity, so this should work fine.
|
if(entity.beat > beat) //the list is sorted based on the beat of the entity, so this should work fine.
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
new GameAction("shoot", "Pitch Ball")
|
new GameAction("shoot", "Pitch Ball")
|
||||||
{
|
{
|
||||||
function = delegate { Spaceball.instance.Shoot(eventCaller.currentEntity.beat, false, eventCaller.currentEntity.type); },
|
function = delegate { Spaceball.instance.Shoot(eventCaller.currentEntity.beat, false, eventCaller.currentEntity["type"]); },
|
||||||
defaultLength = 2,
|
defaultLength = 2,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("shootHigh", "Pitch High Ball")
|
new GameAction("shootHigh", "Pitch High Ball")
|
||||||
{
|
{
|
||||||
function = delegate { Spaceball.instance.Shoot(eventCaller.currentEntity.beat, true, eventCaller.currentEntity.type); },
|
function = delegate { Spaceball.instance.Shoot(eventCaller.currentEntity.beat, true, eventCaller.currentEntity["type"]); },
|
||||||
defaultLength = 3,
|
defaultLength = 3,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("costume", "Change Batter Costume")
|
new GameAction("costume", "Change Batter Costume")
|
||||||
{
|
{
|
||||||
function = delegate { Spaceball.instance.Costume(eventCaller.currentEntity.type); },
|
function = delegate { Spaceball.instance.Costume(eventCaller.currentEntity["type"]); },
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("type", Spaceball.CostumeType.Standard, "Type", "The costume to change to")
|
new Param("type", Spaceball.CostumeType.Standard, "Type", "The costume to change to")
|
||||||
|
@ -94,7 +94,7 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
public Sprite[] Balls;
|
public Sprite[] Balls;
|
||||||
|
|
||||||
private List<Beatmap.Entity> allCameraEvents = new List<Beatmap.Entity>();
|
private List<DynamicBeatmap.DynamicEntity> allCameraEvents = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
|
|
||||||
public Alien alien;
|
public Alien alien;
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
instance = this;
|
instance = this;
|
||||||
var camEvents = EventCaller.GetAllInGameManagerList("spaceball", new string[] { "camera" });
|
var camEvents = EventCaller.GetAllInGameManagerList("spaceball", new string[] { "camera" });
|
||||||
List<Beatmap.Entity> tempEvents = new List<Beatmap.Entity>();
|
List<DynamicBeatmap.DynamicEntity> tempEvents = new List<DynamicBeatmap.DynamicEntity>();
|
||||||
for (int i = 0; i < camEvents.Count; i++)
|
for (int i = 0; i < camEvents.Count; i++)
|
||||||
{
|
{
|
||||||
if (camEvents[i].beat + camEvents[i].beat >= Conductor.instance.songPositionInBeats)
|
if (camEvents[i].beat + camEvents[i].beat >= Conductor.instance.songPositionInBeats)
|
||||||
|
@ -187,26 +187,26 @@ namespace HeavenStudio.Games
|
||||||
if (currentZoomIndex < allCameraEvents.Count && currentZoomIndex >= 0)
|
if (currentZoomIndex < allCameraEvents.Count && currentZoomIndex >= 0)
|
||||||
{
|
{
|
||||||
if (currentZoomIndex - 1 >= 0)
|
if (currentZoomIndex - 1 >= 0)
|
||||||
lastCamDistance = allCameraEvents[currentZoomIndex - 1].valA * -1;
|
lastCamDistance = allCameraEvents[currentZoomIndex - 1]["valA"] * -1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (currentZoomIndex == 0)
|
if (currentZoomIndex == 0)
|
||||||
lastCamDistance = -10;
|
lastCamDistance = -10;
|
||||||
else
|
else
|
||||||
lastCamDistance = allCameraEvents[0].valA * -1;
|
lastCamDistance = allCameraEvents[0]["valA"] * -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
currentZoomCamBeat = allCameraEvents[currentZoomIndex].beat;
|
currentZoomCamBeat = allCameraEvents[currentZoomIndex].beat;
|
||||||
currentZoomCamLength = allCameraEvents[currentZoomIndex].length;
|
currentZoomCamLength = allCameraEvents[currentZoomIndex].length;
|
||||||
|
|
||||||
float dist = allCameraEvents[currentZoomIndex].valA * -1;
|
float dist = allCameraEvents[currentZoomIndex]["valA"] * -1;
|
||||||
|
|
||||||
if (dist > 0)
|
if (dist > 0)
|
||||||
currentZoomCamDistance = 0;
|
currentZoomCamDistance = 0;
|
||||||
else
|
else
|
||||||
currentZoomCamDistance = dist;
|
currentZoomCamDistance = dist;
|
||||||
|
|
||||||
lastEase = allCameraEvents[currentZoomIndex].ease;
|
lastEase = allCameraEvents[currentZoomIndex]["ease"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
new GameAction("bop", "Bop")
|
new GameAction("bop", "Bop")
|
||||||
{
|
{
|
||||||
function = delegate { TapTrial.instance.Bop(eventCaller.currentEntity.toggle); },
|
function = delegate { TapTrial.instance.Bop(eventCaller.currentEntity["toggle"]); },
|
||||||
defaultLength = .5f,
|
defaultLength = .5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -61,7 +61,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
new GameAction("scroll event", "Scroll Background")
|
new GameAction("scroll event", "Scroll Background")
|
||||||
{
|
{
|
||||||
|
|
||||||
function = delegate { TapTrial.instance.scrollEvent(eventCaller.currentEntity.toggle, eventCaller.currentEntity.toggle); },
|
function = delegate { TapTrial.instance.scrollEvent(eventCaller.currentEntity["toggle"], eventCaller.currentEntity["toggle"]); },
|
||||||
defaultLength = .5f,
|
defaultLength = .5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -72,7 +72,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
new GameAction("giraffe events", "Giraffe Animations")
|
new GameAction("giraffe events", "Giraffe Animations")
|
||||||
{
|
{
|
||||||
|
|
||||||
function = delegate { TapTrial.instance.giraffeEvent(eventCaller.currentEntity.toggle, eventCaller.currentEntity.toggle); },
|
function = delegate { TapTrial.instance.giraffeEvent(eventCaller.currentEntity["toggle"], eventCaller.currentEntity["toggle"]); },
|
||||||
defaultLength = .5f,
|
defaultLength = .5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("SFX", "SFX")
|
new GameAction("SFX", "SFX")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; TramAndPauline.instance.SFX(e.beat, e.toggle); },
|
function = delegate { var e = eventCaller.currentEntity; TramAndPauline.instance.SFX(e.beat, e["toggle"]); },
|
||||||
defaultLength = 2.5f,
|
defaultLength = 2.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
function = delegate
|
function = delegate
|
||||||
{
|
{
|
||||||
TrickClass.instance.TossObject(eventCaller.currentEntity.beat, eventCaller.currentEntity.type);
|
TrickClass.instance.TossObject(eventCaller.currentEntity.beat, eventCaller.currentEntity["type"]);
|
||||||
},
|
},
|
||||||
defaultLength = 3,
|
defaultLength = 3,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
|
@ -110,7 +110,7 @@ namespace HeavenStudio.Games
|
||||||
if (timeToEvent > 0f && timeToEvent <= 1f)
|
if (timeToEvent > 0f && timeToEvent <= 1f)
|
||||||
{
|
{
|
||||||
string anim = "WarnBall";
|
string anim = "WarnBall";
|
||||||
switch (e.type)
|
switch (e["type"])
|
||||||
{
|
{
|
||||||
case (int) TrickObjType.Plane:
|
case (int) TrickObjType.Plane:
|
||||||
anim = "WarnPlane";
|
anim = "WarnPlane";
|
||||||
|
|
|
@ -60,7 +60,7 @@ namespace HeavenStudio.Games
|
||||||
instance = this;
|
instance = this;
|
||||||
wizard.Init();
|
wizard.Init();
|
||||||
|
|
||||||
Beatmap.Entity nextStart = GameManager.instance.Beatmap.entities.Find(c => c.datamodel == "wizardsWaltz/start interval" && c.beat + c.length >= Conductor.instance.songPositionInBeats);
|
var nextStart = GameManager.instance.Beatmap.entities.Find(c => c.datamodel == "wizardsWaltz/start interval" && c.beat + c.length >= Conductor.instance.songPositionInBeats);
|
||||||
|
|
||||||
if (nextStart != null)
|
if (nextStart != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -127,7 +127,7 @@ namespace HeavenStudio.Editor.Commands
|
||||||
deletedObj = eventObj;
|
deletedObj = eventObj;
|
||||||
Selections.instance.Deselect(eventObj);
|
Selections.instance.Deselect(eventObj);
|
||||||
Timeline.instance.DestroyEventObject(eventObj.entity);
|
Timeline.instance.DestroyEventObject(eventObj.entity);
|
||||||
// Beatmap.Entity e = deletedObjs[i].entity;
|
// DynamicBeatmap.DynamicEntity e = deletedObjs[i].entity;
|
||||||
// Timeline.instance.AddEventObject(e.datamodel, false, new Vector3(e.beat, -e.track * Timeline.instance.LayerHeight()), e, true, e.eventObj.eventObjID);
|
// Timeline.instance.AddEventObject(e.datamodel, false, new Vector3(e.beat, -e.track * Timeline.instance.LayerHeight()), e, true, e.eventObj.eventObjID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ namespace HeavenStudio.Editor.Commands
|
||||||
{
|
{
|
||||||
for (int i = 0; i < deletedObjs.Count; i++)
|
for (int i = 0; i < deletedObjs.Count; i++)
|
||||||
{
|
{
|
||||||
Beatmap.Entity e = deletedObjs[i].entity;
|
DynamicBeatmap.DynamicEntity e = deletedObjs[i].entity;
|
||||||
eventObjs[i] = Timeline.instance.AddEventObject(e.datamodel, false, new Vector3(e.beat, -e.track * Timeline.instance.LayerHeight()), e, true, e.eventObj.eventObjID);
|
eventObjs[i] = Timeline.instance.AddEventObject(e.datamodel, false, new Vector3(e.beat, -e.track * Timeline.instance.LayerHeight()), e, true, e.eventObj.eventObjID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,7 +190,7 @@ namespace HeavenStudio.Editor.Commands
|
||||||
{
|
{
|
||||||
for (int i = 0; i < copiedObjs.Count; i++)
|
for (int i = 0; i < copiedObjs.Count; i++)
|
||||||
{
|
{
|
||||||
Beatmap.Entity e = copiedObjs[i].entity;
|
DynamicBeatmap.DynamicEntity e = copiedObjs[i].entity;
|
||||||
eventObjs[i] = Timeline.instance.AddEventObject(e.datamodel, false, new Vector3(e.beat, -e.track * Timeline.instance.LayerHeight()), e, true, e.eventObj.eventObjID);
|
eventObjs[i] = Timeline.instance.AddEventObject(e.datamodel, false, new Vector3(e.beat, -e.track * Timeline.instance.LayerHeight()), e, true, e.eventObj.eventObjID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,7 +339,7 @@ namespace HeavenStudio.Editor
|
||||||
{
|
{
|
||||||
var extensions = new[]
|
var extensions = new[]
|
||||||
{
|
{
|
||||||
new ExtensionFilter("Heaven Studio Remix File", "tengoku")
|
new ExtensionFilter("Heaven Studio Remix File", "riq")
|
||||||
};
|
};
|
||||||
|
|
||||||
StandaloneFileBrowser.SaveFilePanelAsync("Save Remix As", "", "remix_level", extensions, (string path) =>
|
StandaloneFileBrowser.SaveFilePanelAsync("Save Remix As", "", "remix_level", extensions, (string path) =>
|
||||||
|
@ -380,9 +380,9 @@ namespace HeavenStudio.Editor
|
||||||
LoadRemix("");
|
LoadRemix("");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadRemix(string json = "")
|
public void LoadRemix(string json = "", string type = "riq")
|
||||||
{
|
{
|
||||||
GameManager.instance.LoadRemix(json);
|
GameManager.instance.LoadRemix(json, type);
|
||||||
Timeline.instance.LoadRemix();
|
Timeline.instance.LoadRemix();
|
||||||
Timeline.instance.TempoInfo.UpdateStartingBPMText();
|
Timeline.instance.TempoInfo.UpdateStartingBPMText();
|
||||||
Timeline.instance.VolumeInfo.UpdateStartingVolumeText();
|
Timeline.instance.VolumeInfo.UpdateStartingVolumeText();
|
||||||
|
@ -396,7 +396,8 @@ namespace HeavenStudio.Editor
|
||||||
{
|
{
|
||||||
var extensions = new[]
|
var extensions = new[]
|
||||||
{
|
{
|
||||||
new ExtensionFilter("Heaven Studio Remix File", new string[] { "tengoku", "rhmania" })
|
new ExtensionFilter("Heaven Studio Remix File", new string[] { "riq" }),
|
||||||
|
new ExtensionFilter("Legacy Heaven Studio Remix", new string[] { "tengoku", "rhmania" })
|
||||||
};
|
};
|
||||||
|
|
||||||
StandaloneFileBrowser.OpenFilePanelAsync("Open Remix", "", extensions, false, (string[] paths) =>
|
StandaloneFileBrowser.OpenFilePanelAsync("Open Remix", "", extensions, false, (string[] paths) =>
|
||||||
|
@ -405,6 +406,7 @@ namespace HeavenStudio.Editor
|
||||||
|
|
||||||
if (path == string.Empty) return;
|
if (path == string.Empty) return;
|
||||||
loadedMusic = false;
|
loadedMusic = false;
|
||||||
|
string extension = path.GetExtension();
|
||||||
|
|
||||||
using var zipFile = File.Open(path, FileMode.Open);
|
using var zipFile = File.Open(path, FileMode.Open);
|
||||||
using var archive = new ZipArchive(zipFile, ZipArchiveMode.Read);
|
using var archive = new ZipArchive(zipFile, ZipArchiveMode.Read);
|
||||||
|
@ -416,7 +418,7 @@ namespace HeavenStudio.Editor
|
||||||
{
|
{
|
||||||
using var stream = entry.Open();
|
using var stream = entry.Open();
|
||||||
using var reader = new StreamReader(stream);
|
using var reader = new StreamReader(stream);
|
||||||
LoadRemix(reader.ReadToEnd());
|
LoadRemix(reader.ReadToEnd(), extension);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -435,7 +437,10 @@ namespace HeavenStudio.Editor
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!loadedMusic)
|
if (!loadedMusic)
|
||||||
|
{
|
||||||
Conductor.instance.musicSource.clip = null;
|
Conductor.instance.musicSource.clip = null;
|
||||||
|
MusicBytes = null;
|
||||||
|
}
|
||||||
|
|
||||||
currentRemixPath = path;
|
currentRemixPath = path;
|
||||||
remixName = Path.GetFileName(path);
|
remixName = Path.GetFileName(path);
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace HeavenStudio.Editor
|
||||||
[SerializeField] private GameObject ColorP;
|
[SerializeField] private GameObject ColorP;
|
||||||
[SerializeField] private GameObject StringP;
|
[SerializeField] private GameObject StringP;
|
||||||
|
|
||||||
public Beatmap.Entity entity;
|
public DynamicBeatmap.DynamicEntity entity;
|
||||||
|
|
||||||
public bool active;
|
public bool active;
|
||||||
|
|
||||||
|
@ -61,13 +61,13 @@ namespace HeavenStudio.Editor
|
||||||
Editor.instance.SetGameEventTitle($"Select game event for {gridGameSelector.SelectedMinigame.Replace("\n", "")}");
|
Editor.instance.SetGameEventTitle($"Select game event for {gridGameSelector.SelectedMinigame.Replace("\n", "")}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StartParams(Beatmap.Entity entity)
|
public void StartParams(DynamicBeatmap.DynamicEntity entity)
|
||||||
{
|
{
|
||||||
active = true;
|
active = true;
|
||||||
AddParams(entity);
|
AddParams(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddParams(Beatmap.Entity entity)
|
private void AddParams(DynamicBeatmap.DynamicEntity entity)
|
||||||
{
|
{
|
||||||
var minigame = EventCaller.instance.GetMinigame(entity.datamodel.Split(0));
|
var minigame = EventCaller.instance.GetMinigame(entity.datamodel.Split(0));
|
||||||
int actionIndex = minigame.actions.IndexOf(minigame.actions.Find(c => c.actionName == entity.datamodel.Split(1)));
|
int actionIndex = minigame.actions.IndexOf(minigame.actions.Find(c => c.actionName == entity.datamodel.Split(1)));
|
||||||
|
@ -118,7 +118,7 @@ namespace HeavenStudio.Editor
|
||||||
{
|
{
|
||||||
prefab = DropdownP;
|
prefab = DropdownP;
|
||||||
}
|
}
|
||||||
else if (objType == typeof(Color))
|
else if (objType == typeof(Color) || objType == typeof(EntityTypes.SerializableColor))
|
||||||
{
|
{
|
||||||
prefab = ColorP;
|
prefab = ColorP;
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,10 +121,11 @@ namespace HeavenStudio.Editor
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Color _:
|
case Color _:
|
||||||
|
case EntityTypes.SerializableColor _:
|
||||||
colorPreview.colorPicker.onColorChanged += _ =>
|
colorPreview.colorPicker.onColorChanged += _ =>
|
||||||
parameterManager.entity[propertyName] = colorPreview.colorPicker.color;
|
parameterManager.entity[propertyName] = colorPreview.colorPicker.color;
|
||||||
|
|
||||||
var paramCol = (Color) parameterManager.entity[propertyName];
|
Color paramCol = parameterManager.entity[propertyName];
|
||||||
|
|
||||||
ColorBTN.onClick.AddListener(
|
ColorBTN.onClick.AddListener(
|
||||||
() =>
|
() =>
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace HeavenStudio.Editor.Track
|
||||||
|
|
||||||
for (int i = 0; i < GameManager.instance.Beatmap.tempoChanges.Count; i++)
|
for (int i = 0; i < GameManager.instance.Beatmap.tempoChanges.Count; i++)
|
||||||
{
|
{
|
||||||
Beatmap.TempoChange tempoChange = GameManager.instance.Beatmap.tempoChanges[i];
|
DynamicBeatmap.TempoChange tempoChange = GameManager.instance.Beatmap.tempoChanges[i];
|
||||||
AddTempoChange(false, tempoChange);
|
AddTempoChange(false, tempoChange);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ namespace HeavenStudio.Editor.Track
|
||||||
tempoTimelineObjs.Clear();
|
tempoTimelineObjs.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddTempoChange(bool create, Beatmap.TempoChange tempoChange_ = null)
|
public void AddTempoChange(bool create, DynamicBeatmap.TempoChange tempoChange_ = null)
|
||||||
{
|
{
|
||||||
GameObject tempoChange = Instantiate(RefTempoChange.gameObject, this.transform);
|
GameObject tempoChange = Instantiate(RefTempoChange.gameObject, this.transform);
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ namespace HeavenStudio.Editor.Track
|
||||||
tempoChange.transform.position = new Vector3(Editor.instance.EditorCamera.ScreenToWorldPoint(Input.mousePosition).x + 0.08f, tempoChange.transform.position.y);
|
tempoChange.transform.position = new Vector3(Editor.instance.EditorCamera.ScreenToWorldPoint(Input.mousePosition).x + 0.08f, tempoChange.transform.position.y);
|
||||||
tempoChange.transform.localPosition = new Vector3(Starpelly.Mathp.Round2Nearest(tempoChange.transform.localPosition.x, Timeline.SnapInterval()), tempoChange.transform.localPosition.y);
|
tempoChange.transform.localPosition = new Vector3(Starpelly.Mathp.Round2Nearest(tempoChange.transform.localPosition.x, Timeline.SnapInterval()), tempoChange.transform.localPosition.y);
|
||||||
|
|
||||||
Beatmap.TempoChange tempoC = new Beatmap.TempoChange();
|
DynamicBeatmap.TempoChange tempoC = new DynamicBeatmap.TempoChange();
|
||||||
tempoC.beat = tempoChange.transform.localPosition.x;
|
tempoC.beat = tempoChange.transform.localPosition.x;
|
||||||
tempoC.tempo = GameManager.instance.Beatmap.bpm;
|
tempoC.tempo = GameManager.instance.Beatmap.bpm;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace HeavenStudio.Editor.Track
|
||||||
[SerializeField] private TMP_Text tempoTXT;
|
[SerializeField] private TMP_Text tempoTXT;
|
||||||
[SerializeField] private RectTransform raycastRect;
|
[SerializeField] private RectTransform raycastRect;
|
||||||
|
|
||||||
public Beatmap.TempoChange tempoChange;
|
public DynamicBeatmap.TempoChange tempoChange;
|
||||||
|
|
||||||
private float startPosX;
|
private float startPosX;
|
||||||
private bool moving = false;
|
private bool moving = false;
|
||||||
|
|
|
@ -503,7 +503,7 @@ namespace HeavenStudio.Editor.Track
|
||||||
|
|
||||||
#region Functions
|
#region Functions
|
||||||
|
|
||||||
public TimelineEventObj AddEventObject(string eventName, bool dragNDrop = false, Vector3 pos = new Vector3(), Beatmap.Entity entity = null, bool addEvent = false, string eventId = "")
|
public TimelineEventObj AddEventObject(string eventName, bool dragNDrop = false, Vector3 pos = new Vector3(), DynamicBeatmap.DynamicEntity entity = null, bool addEvent = false, string eventId = "")
|
||||||
{
|
{
|
||||||
var game = EventCaller.instance.GetMinigame(eventName.Split(0));
|
var game = EventCaller.instance.GetMinigame(eventName.Split(0));
|
||||||
var action = EventCaller.instance.GetGameAction(game, eventName.Split(1));
|
var action = EventCaller.instance.GetGameAction(game, eventName.Split(1));
|
||||||
|
@ -561,11 +561,11 @@ namespace HeavenStudio.Editor.Track
|
||||||
|
|
||||||
if (addEvent)
|
if (addEvent)
|
||||||
{
|
{
|
||||||
Beatmap.Entity tempEntity = entity;
|
DynamicBeatmap.DynamicEntity tempEntity = entity;
|
||||||
|
|
||||||
if (entity == null)
|
if (entity == null)
|
||||||
{
|
{
|
||||||
Beatmap.Entity en = new Beatmap.Entity();
|
DynamicBeatmap.DynamicEntity en = new DynamicBeatmap.DynamicEntity();
|
||||||
en.datamodel = eventName;
|
en.datamodel = eventName;
|
||||||
en.eventObj = eventObj;
|
en.eventObj = eventObj;
|
||||||
|
|
||||||
|
@ -592,8 +592,17 @@ namespace HeavenStudio.Editor.Track
|
||||||
{
|
{
|
||||||
returnVal = ((EntityTypes.Float)ep[i].parameter).val;
|
returnVal = ((EntityTypes.Float)ep[i].parameter).val;
|
||||||
}
|
}
|
||||||
|
else if (propertyType == typeof(Color))
|
||||||
|
{
|
||||||
|
returnVal = new EntityTypes.SerializableColor{ Color = (Color)ep[i].parameter };
|
||||||
|
}
|
||||||
|
else if (propertyType.IsEnum)
|
||||||
|
{
|
||||||
|
returnVal = (int) ep[i].parameter;
|
||||||
|
}
|
||||||
|
|
||||||
tempEntity[ep[i].propertyName] = returnVal;
|
//tempEntity[ep[i].propertyName] = returnVal;
|
||||||
|
tempEntity.CreateProperty(ep[i].propertyName, returnVal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -614,7 +623,7 @@ namespace HeavenStudio.Editor.Track
|
||||||
private List<TimelineEventObj> duplicatedEventObjs = new List<TimelineEventObj>();
|
private List<TimelineEventObj> duplicatedEventObjs = new List<TimelineEventObj>();
|
||||||
public TimelineEventObj CopyEventObject(TimelineEventObj e)
|
public TimelineEventObj CopyEventObject(TimelineEventObj e)
|
||||||
{
|
{
|
||||||
Beatmap.Entity clone = e.entity.DeepCopy();
|
DynamicBeatmap.DynamicEntity clone = e.entity.DeepCopy();
|
||||||
TimelineEventObj dup = AddEventObject(clone.datamodel, false, new Vector3(clone.beat, -clone.track * Timeline.instance.LayerHeight()), clone, true, RandomID());
|
TimelineEventObj dup = AddEventObject(clone.datamodel, false, new Vector3(clone.beat, -clone.track * Timeline.instance.LayerHeight()), clone, true, RandomID());
|
||||||
duplicatedEventObjs.Add(dup);
|
duplicatedEventObjs.Add(dup);
|
||||||
|
|
||||||
|
@ -627,7 +636,7 @@ namespace HeavenStudio.Editor.Track
|
||||||
duplicatedEventObjs = new List<TimelineEventObj>();
|
duplicatedEventObjs = new List<TimelineEventObj>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DestroyEventObject(Beatmap.Entity entity)
|
public void DestroyEventObject(DynamicBeatmap.DynamicEntity entity)
|
||||||
{
|
{
|
||||||
if (EventParameterManager.instance.entity == entity)
|
if (EventParameterManager.instance.entity == entity)
|
||||||
EventParameterManager.instance.Disable();
|
EventParameterManager.instance.Disable();
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace HeavenStudio.Editor.Track
|
||||||
// private GameObject moveTemp;
|
// private GameObject moveTemp;
|
||||||
|
|
||||||
[Header("Properties")]
|
[Header("Properties")]
|
||||||
public Beatmap.Entity entity;
|
public DynamicBeatmap.DynamicEntity entity;
|
||||||
public float length;
|
public float length;
|
||||||
public bool eligibleToMove = false;
|
public bool eligibleToMove = false;
|
||||||
private bool lastVisible;
|
private bool lastVisible;
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace HeavenStudio.Editor.Track
|
||||||
[SerializeField] private TMP_Text volumeTXT;
|
[SerializeField] private TMP_Text volumeTXT;
|
||||||
[SerializeField] private RectTransform raycastRect;
|
[SerializeField] private RectTransform raycastRect;
|
||||||
|
|
||||||
public Beatmap.VolumeChange volumeChange;
|
public DynamicBeatmap.VolumeChange volumeChange;
|
||||||
|
|
||||||
private float startPosX;
|
private float startPosX;
|
||||||
private bool moving = false;
|
private bool moving = false;
|
||||||
|
|
|
@ -259,7 +259,7 @@ namespace HeavenStudio
|
||||||
},
|
},
|
||||||
delegate
|
delegate
|
||||||
{
|
{
|
||||||
GameManager.instance.ToggleInputs(eventCaller.currentEntity.toggle);
|
GameManager.instance.ToggleInputs(eventCaller.currentEntity["toggle"]);
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -300,14 +300,14 @@ namespace HeavenStudio
|
||||||
{
|
{
|
||||||
new Param("type", SoundEffects.CountInType.Normal, "Type", "The sounds to play for the count-in")
|
new Param("type", SoundEffects.CountInType.Normal, "Type", "The sounds to play for the count-in")
|
||||||
},
|
},
|
||||||
delegate { var e = eventCaller.currentEntity; SoundEffects.FourBeatCountIn(e.beat, e.length / 4f, e.type); }
|
delegate { var e = eventCaller.currentEntity; SoundEffects.FourBeatCountIn(e.beat, e.length / 4f, e["type"]); }
|
||||||
),
|
),
|
||||||
new GameAction("8 beat count-in", "8 Beat Count-In", 8f, true,
|
new GameAction("8 beat count-in", "8 Beat Count-In", 8f, true,
|
||||||
new List<Param>()
|
new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("type", SoundEffects.CountInType.Normal, "Type", "The sounds to play for the count-in")
|
new Param("type", SoundEffects.CountInType.Normal, "Type", "The sounds to play for the count-in")
|
||||||
},
|
},
|
||||||
delegate { var e = eventCaller.currentEntity; SoundEffects.EightBeatCountIn(e.beat, e.length / 8f, e.type); }
|
delegate { var e = eventCaller.currentEntity; SoundEffects.EightBeatCountIn(e.beat, e.length / 8f, e["type"]); }
|
||||||
),
|
),
|
||||||
new GameAction("count", "Count", 1f, false,
|
new GameAction("count", "Count", 1f, false,
|
||||||
new List<Param>()
|
new List<Param>()
|
||||||
|
@ -315,7 +315,7 @@ namespace HeavenStudio
|
||||||
new Param("type", SoundEffects.CountNumbers.One, "Number", "The sound to play"),
|
new Param("type", SoundEffects.CountNumbers.One, "Number", "The sound to play"),
|
||||||
new Param("toggle", false, "Alt", "Whether or not the alternate version should be played")
|
new Param("toggle", false, "Alt", "Whether or not the alternate version should be played")
|
||||||
},
|
},
|
||||||
delegate { var e = eventCaller.currentEntity; SoundEffects.Count(e.type, e.toggle); }
|
delegate { var e = eventCaller.currentEntity; SoundEffects.Count(e["type"], e["toggle"]); }
|
||||||
),
|
),
|
||||||
new GameAction("cowbell", "Cowbell",
|
new GameAction("cowbell", "Cowbell",
|
||||||
function: delegate { SoundEffects.Cowbell(); }
|
function: delegate { SoundEffects.Cowbell(); }
|
||||||
|
@ -331,7 +331,7 @@ namespace HeavenStudio
|
||||||
{
|
{
|
||||||
new Param("toggle", false, "Alt", "Whether or not the alternate version should be played")
|
new Param("toggle", false, "Alt", "Whether or not the alternate version should be played")
|
||||||
},
|
},
|
||||||
function: delegate { SoundEffects.Go(eventCaller.currentEntity.toggle); }
|
function: delegate { SoundEffects.Go(eventCaller.currentEntity["toggle"]); }
|
||||||
),
|
),
|
||||||
|
|
||||||
// These are still here for backwards-compatibility but are hidden in the editor
|
// These are still here for backwards-compatibility but are hidden in the editor
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace HeavenStudio
|
namespace HeavenStudio
|
||||||
{
|
{
|
||||||
public class EntityTypes
|
public class EntityTypes
|
||||||
|
@ -33,5 +36,30 @@ namespace HeavenStudio
|
||||||
this.max = max;
|
this.max = max;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://answers.unity.com/questions/772235/cannot-serialize-color.html
|
||||||
|
// i am crying
|
||||||
|
[System.Serializable]
|
||||||
|
public class SerializableColor
|
||||||
|
{
|
||||||
|
public float[] colorStore = new float[4] { 1F, 1F, 1F, 1F };
|
||||||
|
public Color Color
|
||||||
|
{
|
||||||
|
get { return new Color(colorStore[0], colorStore[1], colorStore[2], colorStore[3]); }
|
||||||
|
set { colorStore = new float[4] { value.r, value.g, value.b, value.a }; }
|
||||||
|
}
|
||||||
|
|
||||||
|
//makes this class usable as Color, Color normalColor = mySerializableColor;
|
||||||
|
public static implicit operator Color(SerializableColor instance)
|
||||||
|
{
|
||||||
|
return instance.Color;
|
||||||
|
}
|
||||||
|
|
||||||
|
//makes this class assignable by Color, SerializableColor myColor = Color.white;
|
||||||
|
public static implicit operator SerializableColor(Color color)
|
||||||
|
{
|
||||||
|
return new SerializableColor { Color = color };
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue