32 lines
1.3 KiB
C#
32 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Lean.Pool;
|
|
using UnityEngine;
|
|
|
|
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
|
{
|
|
public class BasicNoteVisual : NoteVisualBase
|
|
{
|
|
public new static BasicNoteVisual GenerateElement(string elementName, string themeBundleName,
|
|
string objectName, Vector3 position, Vector3 eulerAngles, Vector3 scale, BaseElement parent,
|
|
bool isFirstGenerated = true)
|
|
{
|
|
BasicNoteVisual noteVisual = SubstantialObject
|
|
.GenerateElement(elementName, themeBundleName, objectName, position, eulerAngles, scale, parent, isFirstGenerated)
|
|
.GetComponent<BasicNoteVisual>();
|
|
|
|
NoteBase note = parent as NoteBase;
|
|
if(note == null) throw new System.Exception("NoteVisual只能生成在Note下。");
|
|
noteVisual.note = note;
|
|
note.noteVisual = noteVisual;
|
|
|
|
if (isFirstGenerated)
|
|
{
|
|
note.generateEffects.effectList.Add(new BasicNoteGenerateExpand(noteVisual.note));
|
|
note.perfectJudgeEffects.effectList.Add(new BasicNotePerfectBurst(noteVisual.note));
|
|
}
|
|
|
|
return noteVisual;
|
|
}
|
|
}
|
|
} |