Files
ichni_Creator_Studio/Assets/ThemeBundles/Basic/Scripts/NoteVisual/BasicNoteGoodBurst.cs

73 lines
2.4 KiB
C#
Raw Normal View History

using System;
2025-02-02 08:34:54 -05:00
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using Ichni.RhythmGame.ThemeBundles.Basic.Beatmap;
2025-02-02 08:34:54 -05:00
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.Basic
{
2025-02-09 11:09:54 -05:00
public class BasicNoteGoodBurst : NoteGoodEffect
2025-02-02 08:34:54 -05:00
{
private GameObject effectRing;
2025-02-21 14:08:32 -05:00
public BasicNoteGoodBurst(NoteVisualBase noteVisual)
2025-02-02 08:34:54 -05:00
{
2025-02-21 14:08:32 -05:00
this.note = noteVisual.note;
this.noteVisual = noteVisual;
2025-02-02 08:34:54 -05:00
this.effectRing = noteVisual.effectPartList[0];
this.effectTime = 0.1f;
2025-02-02 08:34:54 -05:00
}
public override void Recover()
{
effectRing.SetActive(false);
effectRing.transform.localScale = Vector3.zero;
effectRing.GetComponent<SpriteRenderer>().color = Color.white;
noteVisual.noteMain.SetActive(true);
}
public override void Adjust()
{
effectRing.gameObject.SetActive(true);
effectRing.transform.DOScale(Vector3.one * 0.5f, effectTime).SetEase(Ease.OutQuad);
effectRing.GetComponent<SpriteRenderer>().DOFade(0, effectTime).SetEase(Ease.OutQuad).OnComplete(() => effectRing.SetActive(false));
2025-02-02 08:34:54 -05:00
noteVisual.noteMain.SetActive(false);
}
public override EffectBase_BM ConvertToBM()
{
return new BasicNoteGoodBurst_BM(effectTime);
}
public override void SetUpInspector()
{
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("Basic Note Good Burst");
var effectTimeField = inspector.GenerateParameterInputField(this, container, "Effect Time", nameof(effectTime));
}
}
namespace Beatmap
{
2025-02-09 11:09:54 -05:00
public class BasicNoteGoodBurst_BM : NoteGoodEffect_BM
{
public BasicNoteGoodBurst_BM()
{
}
public BasicNoteGoodBurst_BM(float effectTime) : base(effectTime)
{
}
2025-02-21 14:08:32 -05:00
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
{
2025-02-21 14:08:32 -05:00
return new BasicNoteGoodBurst(attachedGameElement as NoteVisualBase);
}
}
2025-02-02 08:34:54 -05:00
}
}