v13 全量评审(终章):修复 TD-19/TD-20 + 编写 v13 评审文档
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using MoreMountains.Tools;
|
||||
using MoreMountains.Feedbacks;
|
||||
using BaseGames.Player;
|
||||
|
||||
namespace BaseGames.World
|
||||
@@ -17,7 +17,7 @@ namespace BaseGames.World
|
||||
[SerializeField] private bool _destroyAfterUnlock = true;
|
||||
|
||||
[Header("演出配置")]
|
||||
[SerializeField] private Component _unlockFeedback; // Assign MMF_Player or compatible component
|
||||
[SerializeField] private MMF_Player _unlockFeedback;
|
||||
[SerializeField] private float _cutsceneDuration = 1.5f;
|
||||
|
||||
[Header("Event Channel")]
|
||||
@@ -37,7 +37,7 @@ namespace BaseGames.World
|
||||
{
|
||||
_used = true;
|
||||
|
||||
PlayFeedback(_unlockFeedback);
|
||||
_unlockFeedback?.PlayFeedbacks();
|
||||
yield return new WaitForSeconds(_cutsceneDuration);
|
||||
|
||||
stats.UnlockAbility(_abilityToUnlock);
|
||||
@@ -46,12 +46,5 @@ namespace BaseGames.World
|
||||
if (_destroyAfterUnlock)
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
private static void PlayFeedback(Component feedback)
|
||||
{
|
||||
if (feedback == null) return;
|
||||
var method = feedback.GetType().GetMethod("PlayFeedbacks", System.Type.EmptyTypes);
|
||||
method?.Invoke(feedback, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user