Hold初步
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Ichni.RhythmGame.ThemeBundles.Basic.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public class BasicNoteHoldingExpand : NoteHoldingEffect
|
||||
{
|
||||
public BasicNoteHoldingExpand(NoteVisualBaseHold noteVisual)
|
||||
{
|
||||
this.note = noteVisual.note;
|
||||
this.noteVisual = noteVisual;
|
||||
this.effectTime = GetHoldingTime();
|
||||
}
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
noteVisual.noteMain.SetActive(true);
|
||||
noteVisual.noteMain.transform.localScale = Vector3.one;
|
||||
this.effectTime = GetHoldingTime();//TODO: 后续改为修改Hold的判定时间和结束时间时,自动调整effectTime
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
noteVisual.noteMain.transform.localScale = Vector3.one * 2f;
|
||||
}
|
||||
|
||||
public override void Execute()
|
||||
{
|
||||
noteVisual.noteMain.transform.localScale = Vector3.one + Vector3.one * effectProgressPercent;
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new BasicNoteHoldingExpand_BM(effectTime);
|
||||
}
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Basic Note Holding Expand");
|
||||
var holdingTimeText = inspector.GenerateHintText(this, container, () => $"Holding Time: {GetHoldingTime()}");
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BasicNoteHoldingExpand_BM : NoteHoldingEffect_BM
|
||||
{
|
||||
public BasicNoteHoldingExpand_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicNoteHoldingExpand_BM(float effectTime) : base(effectTime)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new BasicNoteHoldingExpand(attachedGameElement as NoteVisualBaseHold);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user