Files
ichni_Creator_Studio/Assets/Scripts/EditorGame/Base/BaseElement.cs
2025-07-14 04:22:50 -04:00

82 lines
1.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using Sirenix.OdinInspector;
using UniRx;
using UnityEngine;
namespace Ichni.RhythmGame
{
public interface IBaseElement
{
public BaseElement_BM matchedBM { get; set; }
/// <summary>
/// 用于生成存档
/// </summary>
public void SaveBM()
{
}
/// <summary>
/// 刷新物体的状态
/// </summary>
public void Refresh()
{
}
/// <summary>
/// 当物体被删除时执行的方法
/// </summary>
public void OnDelete()
{
throw new NotImplementedException();
}
/// <summary>
/// 删除物体,包括所有子物体
/// </summary>
public void Delete()
{
throw new NotImplementedException();
}
public void SetUpInspector()
{
}
}
public interface IHaveInteraction
{
public void TriggerInteraction();
}
namespace Beatmap
{
public abstract class BaseElement_BM
{
public Guid attachedElementGuid;
/// <summary>
/// 从存档类中生成游戏物体
/// </summary>
public abstract void ExecuteBM();
/// <summary>
/// 在AfterInitialize中被调用用于处理GameElement的“需要引用”的物体在此物体后面生成的情况。
/// 注意如果使用此函数需要在ExecuteBM中设置 matchedElement.matchedBM = this;
/// </summary>
public virtual void AfterExecute()
{
}
}
}
}