67 lines
2.2 KiB
C#
67 lines
2.2 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using DG.Tweening;
|
|
using Ichni.Editor;
|
|
using Ichni.RhythmGame.Beatmap;
|
|
using UnityEngine;
|
|
|
|
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
|
{
|
|
public class BasicNoteBadExpand : NoteBadEffect
|
|
{
|
|
Renderer noteMainRenderer;
|
|
public BasicNoteBadExpand(NoteBase note)
|
|
{
|
|
this.note = note;
|
|
this.noteVisual = note.noteVisual.GetComponent<BasicNoteVisual>();
|
|
this.noteMainRenderer = noteVisual.noteMain.GetComponent<Renderer>();
|
|
this.effectTime = 0.1f;
|
|
}
|
|
|
|
public override void Recover()
|
|
{
|
|
noteVisual.noteMain.SetActive(true);
|
|
noteVisual.noteMain.transform.localScale = Vector3.one;
|
|
noteMainRenderer.material.SetColor("_BaseColor", Color.white);
|
|
}
|
|
|
|
public override void Adjust()
|
|
{
|
|
noteMainRenderer.material.DOColor(Color.clear, effectTime).SetEase(Ease.OutQuad);
|
|
noteVisual.noteMain.transform.DOScale(Vector3.one * 1.5f, effectTime).SetEase(Ease.OutQuad).OnComplete(() => noteVisual.noteMain.SetActive(false));
|
|
}
|
|
|
|
public override EffectBase_BM ConvertToBM()
|
|
{
|
|
return new Beatmap.BasicNoteBadExpand_BM(effectTime, note.elementGuid);
|
|
}
|
|
|
|
public override void SetUpInspector()
|
|
{
|
|
var container = inspector.GenerateContainer("Basic Note Bad Expand");
|
|
var effectTimeField = inspector.GenerateInputField(this, container, "Effect Time", nameof(effectTime));
|
|
}
|
|
}
|
|
|
|
namespace Beatmap
|
|
{
|
|
public class BasicNoteBadExpand_BM : NoteBadEffect_BM
|
|
{
|
|
public BasicNoteBadExpand_BM()
|
|
{
|
|
|
|
}
|
|
|
|
public BasicNoteBadExpand_BM(float effectTime, Guid attachedNoteID) : base(effectTime, attachedNoteID)
|
|
{
|
|
|
|
}
|
|
|
|
public override EffectBase ConvertToGameType()
|
|
{
|
|
return new BasicNoteBadExpand(GameElement_BM.GetElement(attachedNoteID) as NoteBase);
|
|
}
|
|
}
|
|
}
|
|
} |