基础内容-7
Trail 完整Note
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Dreamteck.Splines;
|
||||
@@ -7,12 +8,13 @@ using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame
|
||||
{
|
||||
public class Tap : NoteBase
|
||||
public partial class Tap : NoteBase
|
||||
{
|
||||
public static Tap GenerateElement(string elementName, float exactJudgeTime, BaseElement attach)
|
||||
public static Tap GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
float exactJudgeTime, BaseElement attach)
|
||||
{
|
||||
Tap tap = Instantiate(EditorManager.instance.basePrefabs.tapNote, attach.transform).GetComponent<Tap>();
|
||||
tap.Initialize(elementName);
|
||||
tap.Initialize(elementName, id, tags);
|
||||
tap.exactJudgeTime = exactJudgeTime;
|
||||
tap.transformSubmodule = new TransformSubmodule(tap);
|
||||
tap.timeDurationSubmodule = new TimeDurationSubmodule(tap);
|
||||
@@ -42,4 +44,41 @@ namespace Ichni.RhythmGame
|
||||
return tap;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Tap
|
||||
{
|
||||
public override void SaveBM()
|
||||
{
|
||||
matchedBM = new Beatmap.Tap_BM(elementName, elementGuid, tags, parentElement.matchedBM, exactJudgeTime);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class Tap_BM : BaseElement_BM
|
||||
{
|
||||
public float exactJudgeTime;
|
||||
|
||||
public Tap_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Tap_BM(string elementName, Guid elementGuid, List<string> tags, BaseElement_BM attachedElement, float exactJudgeTime)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
this.exactJudgeTime = exactJudgeTime;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = Tap.GenerateElement(elementName, elementGuid, tags, exactJudgeTime, GetElement(attachedElementGuid));
|
||||
}
|
||||
|
||||
public override BaseElement DuplicateBM(BaseElement parent)
|
||||
{
|
||||
return Tap.GenerateElement(elementName, elementGuid, tags, exactJudgeTime, parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user