2025-02-06 23:01:44 -05:00
|
|
|
using System;
|
2025-01-26 21:10:16 -05:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
2025-02-06 23:01:44 -05:00
|
|
|
using Ichni.RhythmGame.Beatmap;
|
2025-01-26 21:10:16 -05:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace Ichni.RhythmGame
|
|
|
|
|
{
|
|
|
|
|
public abstract class SubmoduleBase
|
|
|
|
|
{
|
2025-01-30 22:45:33 -05:00
|
|
|
public BaseElement attachedElement;
|
2025-02-06 23:01:44 -05:00
|
|
|
|
|
|
|
|
public Submodule_BM matchedBM;
|
|
|
|
|
|
2025-01-30 22:45:33 -05:00
|
|
|
public SubmoduleBase(BaseElement attachedElement)
|
|
|
|
|
{
|
|
|
|
|
this.attachedElement = attachedElement;
|
|
|
|
|
}
|
2025-02-06 23:01:44 -05:00
|
|
|
|
2025-01-26 21:10:16 -05:00
|
|
|
public virtual void InitialRefresh()
|
|
|
|
|
{
|
2025-02-06 23:01:44 -05:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public abstract void SaveBM();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace Beatmap
|
|
|
|
|
{
|
|
|
|
|
public abstract class Submodule_BM
|
|
|
|
|
{
|
|
|
|
|
[System.NonSerialized] public BaseElement attachedElement; //存档类对应的游戏物体
|
|
|
|
|
public Guid attachedElementGuid;
|
|
|
|
|
|
|
|
|
|
public Submodule_BM()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Submodule_BM(BaseElement attachedElement)
|
|
|
|
|
{
|
|
|
|
|
this.attachedElement = attachedElement;
|
|
|
|
|
attachedElementGuid = attachedElement.elementGuid;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static BaseElement_BM GetElementBM(Guid id)
|
|
|
|
|
{
|
|
|
|
|
if (BaseElement_BM.identifier.TryGetValue(id, out BaseElement_BM element_BM))
|
|
|
|
|
{
|
|
|
|
|
return element_BM;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Debug.LogAssertion("Element not found or do not have id");
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static BaseElement GetElement(Guid id)
|
|
|
|
|
{
|
|
|
|
|
return GetElementBM(id)?.matchedElement;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public abstract void ExecuteBM();
|
|
|
|
|
public abstract void DuplicateBM(BaseElement attached);
|
2025-01-26 21:10:16 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|