@@ -85,7 +85,8 @@ namespace Ichni.RhythmGame
|
||||
AnimatedFloat nowAnimatedFloat = GetAnimatedFloat(nowTime); //获取当前时间点对应的AnimatedFloat
|
||||
if (nowAnimatedFloat != null) //如果能获取到,表明当前时间点存在动画
|
||||
{
|
||||
if (nowTime + Time.deltaTime >= nowAnimatedFloat.endTime)
|
||||
|
||||
if (currentAnimationIndex == animations.Count - 1 && nowTime + Time.deltaTime >= nowAnimatedFloat.endTime)
|
||||
{
|
||||
value = nowAnimatedFloat.endValue;
|
||||
returnType = FlexibleReturnType.After;
|
||||
@@ -93,7 +94,6 @@ namespace Ichni.RhythmGame
|
||||
lastReturnType = returnType;
|
||||
return;
|
||||
}
|
||||
|
||||
//获取songTime时间点时,基于动画曲线的AnimatedFloat比例点->(0,1)。
|
||||
float nowPercent = AnimationCurveEvaluator.Evaluate(nowAnimatedFloat.animationCurveType,
|
||||
(nowTime - nowAnimatedFloat.startTime) / nowAnimatedFloat.totalTime);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.Editor;
|
||||
@@ -51,13 +52,13 @@ namespace Ichni.RhythmGame
|
||||
var container = inspector.GenerateContainer("Judge Submodule");
|
||||
var submoduleSettings = container.GenerateSubcontainer(3);
|
||||
var effectNameInputField = inspector.GenerateInputField(submoduleSettings, "Judge Unit Name");
|
||||
var addJudgeUnitButton = inspector.GenerateButton(this, submoduleSettings, "Add Judge Unit",
|
||||
var addJudgeUnitButton = inspector.GenerateButton(this, submoduleSettings, "Add Judge Unit",
|
||||
() =>
|
||||
{
|
||||
AddJudgeUnit(effectNameInputField.GetValue<string>());
|
||||
inspectorMain.SetInspector(note);
|
||||
});
|
||||
|
||||
|
||||
foreach (var judgeUnit in judgeUnitList)
|
||||
{
|
||||
judgeUnit.SetUpInspector();
|
||||
@@ -67,20 +68,20 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public partial class NoteJudgeSubmodule
|
||||
{
|
||||
private static Dictionary<string, NoteJudgeUnit> JudgeUnitCollection(NoteBase note) =>
|
||||
new Dictionary<string, NoteJudgeUnit>()
|
||||
private static Dictionary<string, Func<NoteJudgeUnit>> JudgeUnitCollection(NoteBase note) =>
|
||||
new Dictionary<string, Func<NoteJudgeUnit>>()
|
||||
{
|
||||
{ "TouchArea", new TouchAreaJudgeUnit(note, 600) },
|
||||
{ "FullScreenNearTime", new FullScreenNearTimeJudgeUnit(note) },
|
||||
{ "TriggerConnect", new TriggerConnectJudgeUnit(note, null) }
|
||||
{ "TouchArea",()=> new TouchAreaJudgeUnit(note, 600) },
|
||||
{ "FullScreenNearTime",()=> new FullScreenNearTimeJudgeUnit(note) },
|
||||
{ "TriggerConnect",()=> new TriggerConnectJudgeUnit(note, null) }
|
||||
};
|
||||
|
||||
|
||||
public NoteJudgeUnit AddJudgeUnit(string judgeUnitName)
|
||||
{
|
||||
if (JudgeUnitCollection(note).TryGetValue(judgeUnitName, out var newJudgeUnit))
|
||||
{
|
||||
judgeUnitList.Add(newJudgeUnit);
|
||||
return newJudgeUnit;
|
||||
judgeUnitList.Add(newJudgeUnit());
|
||||
return newJudgeUnit();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -89,22 +90,22 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class NoteJudgeSubmodule_BM : Submodule_BM
|
||||
{
|
||||
public List<NoteJudgeUnit_BM> judgeUnitList;
|
||||
|
||||
|
||||
public NoteJudgeSubmodule_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public NoteJudgeSubmodule_BM(GameElement attachedElement, NoteJudgeSubmodule noteJudgeSubmodule) : base(attachedElement)
|
||||
{
|
||||
judgeUnitList = new List<NoteJudgeUnit_BM>();
|
||||
|
||||
|
||||
foreach (var judgeUnit in noteJudgeSubmodule.judgeUnitList)
|
||||
{
|
||||
judgeUnitList.Add(judgeUnit.ConvertToBM());
|
||||
@@ -116,7 +117,7 @@ namespace Ichni.RhythmGame
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
(attachedElement as NoteBase).noteJudgeSubmodule = new NoteJudgeSubmodule(attachedElement as NoteBase, judgeUnitList);
|
||||
}
|
||||
|
||||
|
||||
public override void DuplicateBM(GameElement attached)
|
||||
{
|
||||
(attached as NoteBase).noteJudgeSubmodule = new NoteJudgeSubmodule(attached as NoteBase, judgeUnitList);
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Ichni.Editor
|
||||
{
|
||||
if (gameObject != null) Destroy(gameObject);
|
||||
instance = null;
|
||||
});
|
||||
}).AddTo(this);
|
||||
}
|
||||
|
||||
void Update()
|
||||
|
||||
Reference in New Issue
Block a user