64 lines
2.0 KiB
C#
64 lines
2.0 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using DG.Tweening;
|
|
using Ichni.RhythmGame.Beatmap;
|
|
using Ichni.RhythmGame.ThemeBundles.Basic.Beatmap;
|
|
using UnityEngine;
|
|
|
|
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
|
{
|
|
public class BasicNotePerfectBurst : NotePerfectEffect
|
|
{
|
|
private GameObject effectRing;
|
|
|
|
public BasicNotePerfectBurst(NoteBase note)
|
|
{
|
|
this.note = note;
|
|
this.noteVisual = note.noteVisual.GetComponent<BasicNoteVisual>();
|
|
this.effectRing = noteVisual.effectPartList[0];
|
|
}
|
|
|
|
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.1f).SetEase(Ease.OutQuad);
|
|
effectRing.GetComponent<SpriteRenderer>().DOFade(0, 0.1f).SetEase(Ease.OutQuad).OnComplete(() => effectRing.SetActive(false));
|
|
noteVisual.noteMain.SetActive(false);
|
|
}
|
|
|
|
public override EffectBase_BM ConvertToBM()
|
|
{
|
|
return new BasicNotePerfectBurst_BM(effectTime, note.elementGuid);
|
|
}
|
|
}
|
|
|
|
namespace Beatmap
|
|
{
|
|
public class BasicNotePerfectBurst_BM : NotePerfectEffect_BM
|
|
{
|
|
public BasicNotePerfectBurst_BM()
|
|
{
|
|
|
|
}
|
|
|
|
public BasicNotePerfectBurst_BM(float effectTime, Guid attachedNoteID) : base(effectTime, attachedNoteID)
|
|
{
|
|
|
|
}
|
|
|
|
public override EffectBase ConvertToGameType()
|
|
{
|
|
return new BasicNotePerfectBurst(GameElement_BM.GetElement(attachedNoteID) as NoteBase);
|
|
}
|
|
}
|
|
}
|
|
} |