基础内容-5
主题包; 测试NoteVisual与NoteEffect; LookAt旋转动画与FlexibleBool 动画杂项 控制台初步
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public class BasicNotePerfectBurst : NoteEffectBase
|
||||
{
|
||||
private GameObject effectRing;
|
||||
|
||||
public void Initialize(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.OutBack);
|
||||
effectRing.GetComponent<SpriteRenderer>().DOFade(0, 0.1f).SetEase(Ease.OutBack).OnComplete(() => effectRing.SetActive(false));
|
||||
noteVisual.noteMain.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user