히든제스처
This commit is contained in:
@@ -48,11 +48,13 @@ public static void Disarm()
|
||||
}
|
||||
|
||||
// 제스처 존이 호출. 무장 중이고 key가 맞을 때만 1회 발동.
|
||||
public static void Fire(string key)
|
||||
// 반환: 이번 호출로 실제 발동했으면 true (호출 측이 "그때만" 아이템 소비 등에 쓸 수 있게).
|
||||
public static bool Fire(string key)
|
||||
{
|
||||
if (!Armed || Fired) return;
|
||||
if (!string.IsNullOrEmpty(_armedKey) && _armedKey != key) return;
|
||||
if (!Armed || Fired) return false;
|
||||
if (!string.IsNullOrEmpty(_armedKey) && _armedKey != key) return false;
|
||||
Fired = true;
|
||||
FiredEvent?.Invoke();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user