67 lines
2.0 KiB
C#
67 lines
2.0 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Serialization;
|
|
|
|
namespace Ichni.RhythmGame
|
|
{
|
|
public abstract class NoteVisualBase : SubstantialObject, IHaveEffectSubmodule, IHaveSelectSubmodule
|
|
{
|
|
#region [暴露属性字段] Essential Configs
|
|
public NoteBase note;
|
|
|
|
public bool isHighlighted;
|
|
|
|
public GameObject noteMain;
|
|
public GameObject judgeEffect;
|
|
|
|
public GameObject perfectPoint;
|
|
|
|
public List<GameObject> notePartList;
|
|
public List<GameObject> extraPartList;
|
|
public List<GameObject> effectPrefabList;
|
|
#endregion
|
|
|
|
#region [计算与状态缓存] Calculated & Cached States
|
|
public virtual Vector3 noteVisualPosition => noteMain.transform.position;
|
|
public EffectSubmodule effectSubmodule { get; set; }
|
|
public SelectSubmodule selectSubmodule { get; set; }
|
|
#endregion
|
|
|
|
#region [生命周期] Lifecycle & Factory
|
|
public new static NoteVisualBase GenerateElement(string elementName, Guid id, List<string> tags,
|
|
bool isFirstGenerated, string themeBundleName, string objectName, GameElement parentElement, bool isHighlighted)
|
|
{
|
|
NoteVisualBase noteVisual = SubstantialObject.GenerateElement(elementName, id, tags,
|
|
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<NoteVisualBase>();
|
|
|
|
noteVisual.isHighlighted = isHighlighted;
|
|
noteVisual.SetHighlight();
|
|
|
|
return noteVisual;
|
|
}
|
|
|
|
public override void SetDefaultSubmodules()
|
|
{
|
|
base.SetDefaultSubmodules();
|
|
effectSubmodule = new EffectSubmodule(this, EffectSubmodule.EffectSubmodulePreset.Note);
|
|
}
|
|
#endregion
|
|
|
|
#region [行为重写] Behavior Overrides
|
|
public virtual void Recover()
|
|
{
|
|
|
|
}
|
|
|
|
public virtual void SetHighlight()
|
|
{
|
|
|
|
}
|
|
#endregion
|
|
}
|
|
|
|
|
|
|
|
} |