mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 09:47:39 +02:00
Put Minigame Definitions in a Dictionary (#614)
* put minigame definitions in a dictionary why haven't we done this two years ago * paranoia
This commit is contained in:
@ -873,10 +873,8 @@ namespace HeavenStudio.Editor.Track
|
||||
|
||||
public TimelineEventObj AddEventObject(string eventName, bool dragNDrop = false, Vector3 pos = new Vector3(), RiqEntity entity = null, bool addEvent = false)
|
||||
{
|
||||
var game = EventCaller.instance.GetMinigame(eventName.Split(0));
|
||||
var action = EventCaller.instance.GetGameAction(game, eventName.Split(1));
|
||||
|
||||
var gameAction = EventCaller.instance.GetGameAction(EventCaller.instance.GetMinigame(eventName.Split(0)), eventName.Split(1));
|
||||
string[] split = eventName.Split('/');
|
||||
var action = EventCaller.instance.GetGameAction(split[0], split[1]);
|
||||
|
||||
if (addEvent)
|
||||
{
|
||||
@ -884,7 +882,7 @@ namespace HeavenStudio.Editor.Track
|
||||
|
||||
if (entity == null)
|
||||
{
|
||||
RiqEntity en = GameManager.instance.Beatmap.AddNewEntity(eventName, 0, gameAction.defaultLength);
|
||||
RiqEntity en = GameManager.instance.Beatmap.AddNewEntity(eventName, 0, action.defaultLength);
|
||||
|
||||
tempEntity = en;
|
||||
|
||||
|
Reference in New Issue
Block a user