private void StartCapturing(CapturingPlayer player) { catureCanvas.enabled = true; captureProgress = 0; capturingPlayer = player; captureIndicatorCanvas.enabled = !indicatorActive; }
public void SetHeldState(EHeldState newState) { HeldState = newState; switch (HeldState) { case EHeldState.Carried: if (_glowObject != null && _glowObject.IsActive) { _glowObject.IsActive = false; } IsActive = false; if (HoldResetTimeSeconds > 0) { _holdResetTime = TCPManager.GetTimeStampMS() + HoldResetTimeSeconds * 1000; CapturingPlayer?.SendClientMessage($"You may hold this object for up to {HoldResetTimeSeconds / 60} minutes before it will reset."); CapturingPlayer?.SendClientMessage($"You may hold this object for up to {HoldResetTimeSeconds / 60} minutes before it will reset.", ChatLogFilters.CHATLOGFILTERS_C_WHITE); } break; case EHeldState.Ground: _holdResetTime = 0; if (_glowObject != null && _glowObject.IsActive) { _glowObject.IsActive = false; } IsActive = true; break; case EHeldState.Home: _holdResetTime = 0; if (_glowObject != null && !_glowObject.IsActive) { _glowObject.IsActive = true; } IsActive = true; break; case EHeldState.Inactive: _holdResetTime = 0; if (_glowObject != null && !_glowObject.IsActive) { _glowObject.IsActive = true; } IsActive = false; break; } }
private void StopCapturing(CapturingPlayer player) { catureCanvas.enabled = false; capturingPlayer = null; captureIndicatorCanvas.enabled = indicatorActive; }