更新至unity6并且更改Scriptable完成

This commit is contained in:
2025-11-25 10:52:39 +08:00
parent 2e0d16db49
commit 5d6acc1001
482 changed files with 2314 additions and 47257 deletions

View File

@@ -7,15 +7,26 @@ namespace Demo.Game
public abstract class IJudgementHookObject : ScriptableObject, IHookInteraction
{
[Content, SerializeField] private IInteraction MyInteractionModule;
[Content, SerializeField] private IInteraction m_MyInteractionModule;
private IInteraction MyInteractionModule
{
get
{
if (m_MyInteractionModule == null)
m_MyInteractionModule = Parent.GetComponent<IInteraction>();
return m_MyInteractionModule;
}
set
{
m_MyInteractionModule = value;
}
}
public abstract void OnJudgement(IInteraction.JudgementLevel level);
public override IEnumerator LoadScript(string script)
protected override IEnumerator DoSomethingDuringApplyScript()
{
yield return base.LoadScript(script);
if (MyInteractionModule == null)
MyInteractionModule = Parent.GetComponent<IInteraction>();
yield return base.DoSomethingDuringApplyScript();
MyInteractionModule.JudgementEvent.AddListener(OnJudgement);
}