Hold
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Lean.Pool;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
||||
{
|
||||
public class DTMNoteHoldingBreath : NoteHoldingEffect
|
||||
{
|
||||
private ParticleSystem breathParticle;
|
||||
|
||||
public DTMNoteHoldingBreath(DTMNoteVisualHold noteVisual)
|
||||
{
|
||||
this.note = noteVisual.note;
|
||||
this.noteVisual = noteVisual;
|
||||
this.effectTime = GetHoldingTime();
|
||||
}
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
if(breathParticle != null) LeanPool.Despawn(breathParticle.gameObject);
|
||||
}
|
||||
|
||||
public override void PreExecute()
|
||||
{
|
||||
breathParticle = LeanPool.Spawn(noteVisual.effectPrefabList[3], noteVisual.judgeEffect.transform).GetComponent<ParticleSystem>();
|
||||
breathParticle.Play();
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
breathParticle.Stop(true, ParticleSystemStopBehavior.StopEmittingAndClear);
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new Beatmap.DTMNoteHoldingBreath_BM(effectTime);
|
||||
}
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Basic Note Holding Expand");
|
||||
var subcontainer = container.GenerateSubcontainer(3);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class DTMNoteHoldingBreath_BM : NoteHoldingEffect_BM
|
||||
{
|
||||
public DTMNoteHoldingBreath_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DTMNoteHoldingBreath_BM(float effectTime) : base(effectTime)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new DTMNoteHoldingBreath(attachedGameElement as DTMNoteVisualHold);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user