2025-02-11 22:58:56 -05:00
|
|
|
|
using System.Collections;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using Ichni.RhythmGame;
|
2025-02-12 00:01:23 -05:00
|
|
|
|
using TMPro;
|
2025-02-11 22:58:56 -05:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Ichni.Editor
|
|
|
|
|
|
{
|
|
|
|
|
|
public abstract class DynamicUIElement : MonoBehaviour
|
|
|
|
|
|
{
|
2025-02-12 00:01:23 -05:00
|
|
|
|
public TMP_Text title;
|
2025-02-12 18:46:46 -05:00
|
|
|
|
public IBaseElement connectedBaseElement;
|
2025-02-12 00:01:23 -05:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 参数名,通过反射获取饿修改对应变量的值
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string parameterName;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-02-13 14:26:37 -05:00
|
|
|
|
/// 是否始终更新,如果子类可能用到此变量,则在子类中写Update即可(注意,如果最后仅有Text用到此变量,直接移动它到Text即可)
|
2025-02-12 00:01:23 -05:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool isAlwaysUpdated;
|
|
|
|
|
|
|
2025-02-12 18:46:46 -05:00
|
|
|
|
public virtual void Initialize(IBaseElement baseElement, string title, string parameterName)
|
2025-02-12 00:01:23 -05:00
|
|
|
|
{
|
2025-02-12 18:46:46 -05:00
|
|
|
|
this.connectedBaseElement = baseElement;
|
2025-02-12 00:01:23 -05:00
|
|
|
|
this.parameterName = parameterName;
|
|
|
|
|
|
this.title.text = title;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-02-11 22:58:56 -05:00
|
|
|
|
//public abstract void ApplyParameters();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|