• Hello
Search Results for

    Show / Hide Table of Contents

    Class DeviceTimeCheatingDetector

    Detects device or system clock manipulation by observing a and exposing a trustworthy CurrentUtcTime derived from either internet time or device time.

    Inheritance
    System.Object
    ADetector
    DeviceTimeCheatingDetector
    Implements
    IDetector
    Inherited Members
    ADetector.IsActive
    ADetector.Subscribe(IObserver<IDetectorStatus>)
    ADetector.Notify(IDetectorStatus)
    ADetector.Dispose()
    Namespace: GUPS.AntiCheat.Detector
    Assembly: cs.temp.dll.dll
    Syntax
    public class DeviceTimeCheatingDetector : ADetector
    Remarks

    The detector subscribes on awake to the on the same and forwards deviation notifications. The computed UTC time is consumed by GUPS.AntiCheat.Protected.Time.ProtectedTime.

    Fields

    CurrentUtcTime

    The computed UTC time. May differ from because it is calculated to be as trustworthy as possible.

    Declaration
    public DateTime CurrentUtcTime
    Field Value
    Type Description
    DateTime

    OnCheatingDetectionEvent

    Unity event raised on every detection. Useful to wire up reactions through the inspector without writing an .

    Declaration
    public CheatingDetectionEvent<CheatingDetectionStatus> OnCheatingDetectionEvent
    Field Value
    Type Description
    CheatingDetectionEvent<CheatingDetectionStatus>

    Properties

    IsSupported

    Gets a value indicating whether the detector is supported on the current platform.

    Declaration
    public override bool IsSupported { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    ADetector.IsSupported

    Name

    Gets the human-readable name of the detector.

    Declaration
    public override String Name { get; }
    Property Value
    Type Description
    String
    Overrides
    ADetector.Name

    PossibleCheatingDetected

    Gets a value indicating whether the detector has observed possible cheating activity.

    Declaration
    public override bool PossibleCheatingDetected { get; protected set; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    ADetector.PossibleCheatingDetected

    ThreatRating

    Gets the threat rating reported with every detection. Higher values denote greater perceived threats.

    Declaration
    public override uint ThreatRating { get; protected set; }
    Property Value
    Type Description
    System.UInt32
    Overrides
    ADetector.ThreatRating

    UseInternetTime

    Gets a value indicating whether the detector uses internet time for the application start time.

    Declaration
    public bool UseInternetTime { get; }
    Property Value
    Type Description
    System.Boolean

    Methods

    Awake()

    Subscribes to the on the same and captures the application start time.

    Declaration
    protected override void Awake()
    Overrides
    ADetector.Awake()

    FixedUpdate()

    Recalculates CurrentUtcTime from GUPS.AntiCheat.Detector.DeviceTimeCheatingDetector.applicationStartDateTime and the Unity real time since startup.

    Declaration
    protected virtual void FixedUpdate()

    OnApplicationFocus(Boolean)

    Recalculates the application start time when the application regains focus.

    Declaration
    protected virtual void OnApplicationFocus(bool _HasFocus)
    Parameters
    Type Name Description
    System.Boolean _HasFocus

    true if focus was gained; false if lost.

    OnApplicationPause(Boolean)

    Recalculates the application start time when the application is unpaused.

    Declaration
    protected virtual void OnApplicationPause(bool _IsPaused)
    Parameters
    Type Name Description
    System.Boolean _IsPaused

    true if the application is being paused; false if unpaused.

    OnCompleted()

    Called when an observed subject signals completion.

    Declaration
    public override void OnCompleted()
    Overrides
    ADetector.OnCompleted()

    OnError(Exception)

    Called when an observed subject reports an error.

    Declaration
    public override void OnError(Exception _Error)
    Parameters
    Type Name Description
    Exception _Error

    The error reported by the observed subject.

    Overrides
    ADetector.OnError(Exception)

    OnNext(IWatchedSubject)

    Receives notifications from the subscribed and forwards any deviation to observers and event listeners.

    Declaration
    public override void OnNext(IWatchedSubject _Subject)
    Parameters
    Type Name Description
    IWatchedSubject _Subject

    The status published by the device time monitor.

    Overrides
    ADetector.OnNext(IWatchedSubject)

    Start()

    Checks for a startup deviation and notifies observers if the device clock differs noticeably from the reference time.

    Declaration
    protected virtual void Start()

    Implements

    IDetector

    See Also

    AntiCheatMonitor
    In This Article
    Back to top GuardingPearSoftware documentation