多轮审查评估
This commit is contained in:
@@ -23,9 +23,16 @@ namespace BaseGames.Puzzle
|
||||
private bool _isActivated;
|
||||
public bool IsActivated => _isActivated;
|
||||
|
||||
protected virtual void Awake()
|
||||
{
|
||||
bool savedState = !string.IsNullOrEmpty(_receiverId)
|
||||
&& _worldState != null
|
||||
&& _worldState.HasFlag("receiver_" + _receiverId);
|
||||
_isActivated = savedState || _startsActivated;
|
||||
}
|
||||
|
||||
protected virtual void Start()
|
||||
{
|
||||
_isActivated = _startsActivated;
|
||||
if (_isActivated) OnActivate();
|
||||
}
|
||||
|
||||
|
||||
@@ -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