基础内容-6
技术性调整; Note效果;
This commit is contained in:
@@ -1,18 +1,56 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using Ichni.RhythmGame;
|
||||
using UnityEngine;
|
||||
|
||||
public class BasicNoteGenerateExpand : MonoBehaviour
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
public class BasicNoteGenerateExpand : NoteEffectBase
|
||||
{
|
||||
|
||||
}
|
||||
public float generateTime;
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
public BasicNoteGenerateExpand(NoteBase note)
|
||||
{
|
||||
this.note = note;
|
||||
this.generateTime = 1f;
|
||||
this.effectTime = 0.1f;
|
||||
this.noteVisual = note.noteVisual.GetComponent<BasicNoteVisual>();
|
||||
}
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
noteVisual.noteMain.SetActive(false);
|
||||
noteVisual.noteMain.transform.localScale = Vector3.zero;
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
noteVisual.noteMain.SetActive(true);
|
||||
noteVisual.noteMain.transform.DOScale(Vector3.one, 0.1f).SetEase(Ease.OutBack);
|
||||
}
|
||||
|
||||
public override EffectState CheckEffectState()
|
||||
{
|
||||
float songTime = EditorManager.instance.songModule.songTime;
|
||||
|
||||
if (songTime < note.exactJudgeTime - generateTime)
|
||||
{
|
||||
return EffectState.Before;
|
||||
}
|
||||
|
||||
if (songTime >= note.exactJudgeTime - generateTime &&
|
||||
songTime <= note.exactJudgeTime - generateTime + effectTime)
|
||||
{
|
||||
return EffectState.Middle;
|
||||
}
|
||||
|
||||
if (songTime > note.exactJudgeTime - generateTime + effectTime)
|
||||
{
|
||||
return EffectState.After;
|
||||
}
|
||||
|
||||
return EffectState.Error;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user