多轮审查评估
This commit is contained in:
@@ -43,7 +43,19 @@ namespace BaseGames.Puzzle
|
||||
public bool IsActive => _isActive;
|
||||
public event Action<bool> OnStateChanged;
|
||||
|
||||
private void Start() => _isActive = _startsActive;
|
||||
private void Awake()
|
||||
{
|
||||
bool savedState = !string.IsNullOrEmpty(_switchId)
|
||||
&& _worldState != null
|
||||
&& _worldState.HasFlag("switch_" + _switchId);
|
||||
_isActive = savedState || _startsActive;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if (_isActive && _activeClip != null) _animancer?.Play(_activeClip);
|
||||
else if (_inactiveClip != null) _animancer?.Play(_inactiveClip);
|
||||
}
|
||||
|
||||
// ── IInteractable ────────────────────────────────────────────────────
|
||||
public string InteractPrompt => _mode == SwitchTriggerMode.Hold ? "按住交互" : "交互";
|
||||
|
||||
Reference in New Issue
Block a user