Chapter 2 和一些优先度调整
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Ichni.RhythmGame.ThemeBundles.Basic;
|
||||
using Ichni.RhythmGame.ThemeBundles.MetropolisOnOrbit.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.MetropolisOnOrbit
|
||||
{
|
||||
public class MOONoteHoldingAnimation : NoteHoldingEffect
|
||||
{
|
||||
MOONoteVisualHoldStatic mooNoteVisual => noteVisual as MOONoteVisualHoldStatic;
|
||||
|
||||
public MOONoteHoldingAnimation(MOONoteVisualHoldStatic noteVisual)
|
||||
{
|
||||
this.note = noteVisual.note;
|
||||
this.noteVisual = noteVisual;
|
||||
this.effectTime = GetHoldingTime();
|
||||
}
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
this.effectTime = GetHoldingTime();
|
||||
mooNoteVisual.holdingEffect.transform.localScale = Vector3.zero;
|
||||
mooNoteVisual.holdingEffect.GetComponent<SpriteRenderer>().color = new Color(0.5314465f, 1, 0.9687631f);
|
||||
mooNoteVisual.holdingEffect.GetComponent<Animator>().CrossFade("Idle", 0f);
|
||||
}
|
||||
|
||||
public override void PreExecute()
|
||||
{
|
||||
mooNoteVisual.holdingEffect.transform.DOScale(0.45f, 0.25f).SetEase(Ease.OutCirc);
|
||||
mooNoteVisual.holdingEffect.GetComponent<Animator>().CrossFade("Holding", 0f);
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
mooNoteVisual.holdingEffect.transform.DOScale(1f, 0.25f).SetEase(Ease.OutCirc);
|
||||
mooNoteVisual.holdingEffect.GetComponent<SpriteRenderer>().DOFade(0f, 0.25f).SetEase(Ease.OutCirc);
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new MOONoteHoldingAnimation_BM(effectTime);
|
||||
}
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("MOO Note Holding Animation");
|
||||
var subcontainer = container.GenerateSubcontainer(3);
|
||||
var holdingTimeText = inspector.GenerateHintText(this, subcontainer, () => $"Holding Time: {GetHoldingTime()}");
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class MOONoteHoldingAnimation_BM : NoteHoldingEffect_BM
|
||||
{
|
||||
public MOONoteHoldingAnimation_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public MOONoteHoldingAnimation_BM(float effectTime) : base(effectTime)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new MOONoteHoldingAnimation(attachedGameElement as MOONoteVisualHoldStatic);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user