mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 09:57:37 +02:00
start implementation of new format
needs fixes for some types
This commit is contained in:
@ -503,7 +503,7 @@ namespace HeavenStudio.Editor.Track
|
||||
|
||||
#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 action = EventCaller.instance.GetGameAction(game, eventName.Split(1));
|
||||
@ -561,11 +561,11 @@ namespace HeavenStudio.Editor.Track
|
||||
|
||||
if (addEvent)
|
||||
{
|
||||
Beatmap.Entity tempEntity = entity;
|
||||
DynamicBeatmap.DynamicEntity tempEntity = entity;
|
||||
|
||||
if (entity == null)
|
||||
{
|
||||
Beatmap.Entity en = new Beatmap.Entity();
|
||||
DynamicBeatmap.DynamicEntity en = new DynamicBeatmap.DynamicEntity();
|
||||
en.datamodel = eventName;
|
||||
en.eventObj = eventObj;
|
||||
|
||||
@ -592,8 +592,17 @@ namespace HeavenStudio.Editor.Track
|
||||
{
|
||||
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>();
|
||||
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());
|
||||
duplicatedEventObjs.Add(dup);
|
||||
|
||||
@ -627,7 +636,7 @@ namespace HeavenStudio.Editor.Track
|
||||
duplicatedEventObjs = new List<TimelineEventObj>();
|
||||
}
|
||||
|
||||
public void DestroyEventObject(Beatmap.Entity entity)
|
||||
public void DestroyEventObject(DynamicBeatmap.DynamicEntity entity)
|
||||
{
|
||||
if (EventParameterManager.instance.entity == entity)
|
||||
EventParameterManager.instance.Disable();
|
||||
|
Reference in New Issue
Block a user