完成Note预制体的创建体系

This commit is contained in:
2025-10-08 00:35:50 +08:00
parent 3429df6e49
commit ed0dc0b523
9 changed files with 235 additions and 91 deletions

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Convention;
using UnityEngine;
@@ -19,6 +18,7 @@ namespace Demo.Game
[Content, SerializeField] private IInteraction MyInteractionModule;
[Content, SerializeField] private InteractiveEffectType MyInteractiveLevel = default;
public abstract void OnInit();
public abstract void OnBegin();
public abstract void OnEnd();
@@ -31,24 +31,28 @@ namespace Demo.Game
{
case InteractiveEffectType.VisibleDuration:
{
MyInteractionModule.VisibleDurationBeforeEvent.AddListener(OnInit);
MyInteractionModule.VisibleDurationBeginEvent.AddListener(OnBegin);
MyInteractionModule.VisibleDurationEndEvent.AddListener(OnEnd);
}
break;
case InteractiveEffectType.InteractiveDuration:
{
MyInteractionModule.InteractiveDurationBeforeEvent.AddListener(OnInit);
MyInteractionModule.InteractiveDurationBeginEvent.AddListener(OnBegin);
MyInteractionModule.InteractiveDurationEndEvent.AddListener(OnEnd);
}
break;
case InteractiveEffectType.InteractableScoreInterval:
{
MyInteractionModule.InteractableScoreIntervalBeforeEvent.AddListener(OnInit);
MyInteractionModule.InteractableScoreIntervalBeginEvent.AddListener(OnBegin);
MyInteractionModule.InteractableScoreIntervalEndEvent.AddListener(OnEnd);
}
break;
case InteractiveEffectType.InteractableIntervalThatCanScoreBest:
{
MyInteractionModule.InteractableIntervalThatCanScoreBestBeforeEvent.AddListener(OnInit);
MyInteractionModule.InteractableIntervalThatCanScoreBestBeginEvent.AddListener(OnBegin);
MyInteractionModule.InteractableIntervalThatCanScoreBestEndEvent.AddListener(OnEnd);
}
@@ -65,24 +69,28 @@ namespace Demo.Game
{
case InteractiveEffectType.VisibleDuration:
{
MyInteractionModule.VisibleDurationBeforeEvent.RemoveListener(OnInit);
MyInteractionModule.VisibleDurationBeginEvent.RemoveListener(OnBegin);
MyInteractionModule.VisibleDurationEndEvent.RemoveListener(OnEnd);
}
break;
case InteractiveEffectType.InteractiveDuration:
{
MyInteractionModule.InteractiveDurationBeforeEvent.RemoveListener(OnInit);
MyInteractionModule.InteractiveDurationBeginEvent.RemoveListener(OnBegin);
MyInteractionModule.InteractiveDurationEndEvent.RemoveListener(OnEnd);
}
break;
case InteractiveEffectType.InteractableScoreInterval:
{
MyInteractionModule.InteractableScoreIntervalBeforeEvent.RemoveListener(OnInit);
MyInteractionModule.InteractableScoreIntervalBeginEvent.RemoveListener(OnBegin);
MyInteractionModule.InteractableScoreIntervalEndEvent.RemoveListener(OnEnd);
}
break;
case InteractiveEffectType.InteractableIntervalThatCanScoreBest:
{
MyInteractionModule.InteractableIntervalThatCanScoreBestBeforeEvent.RemoveListener(OnInit);
MyInteractionModule.InteractableIntervalThatCanScoreBestBeginEvent.RemoveListener(OnBegin);
MyInteractionModule.InteractableIntervalThatCanScoreBestEndEvent.RemoveListener(OnEnd);
}