ClientResource
Abstract class · Namespace OMX.ModAPI.Client · Assembly OMX.ModAPI.Client.dll
public abstract class ClientResource : IClientResourceEntry point for a client resource. OMX discovers the single public derived class, supplies a scoped runtime, wires lifecycle events and removes all subscriptions, timers, HUD and input state when the resource stops.
Implements: IClientResource
Constructors
Section titled “Constructors”protected ClientResource();Properties
Section titled “Properties”protected IClientAudio Audio { get; }DriverView
Section titled “DriverView”protected IDriverView DriverView { get; }protected IClientHud Hud { get; }protected IClientInput Input { get; }LocalPlayer
Section titled “LocalPlayer”protected IPlayer? LocalPlayer { get; }protected IResourceLog Log { get; }Messages
Section titled “Messages”protected IClientMessages Messages { get; }Network
Section titled “Network”protected IClientEvents Network { get; }Players
Section titled “Players”protected IPlayers Players { get; }Resource
Section titled “Resource”protected ResourceInfo Resource { get; }Resources
Section titled “Resources”protected IResourceBus Resources { get; }Runtime
Section titled “Runtime”protected IClientRuntime Runtime { get; }Scheduler
Section titled “Scheduler”protected IResourceScheduler Scheduler { get; }Storage
Section titled “Storage”protected IResourceStorage Storage { get; }Vehicles
Section titled “Vehicles”protected IClientVehicles Vehicles { get; }protected IClientWorld World { get; }Methods
Section titled “Methods”OnMapLoaded
Section titled “OnMapLoaded”protected virtual void OnMapLoaded(string mapName);Parameters
mapNamestring
OnMapUnloaded
Section titled “OnMapUnloaded”protected virtual void OnMapUnloaded(string mapName);Parameters
mapNamestring
OnPlayerJoined
Section titled “OnPlayerJoined”protected virtual void OnPlayerJoined(IPlayer player);Parameters
playerIPlayer
OnPlayerLeft
Section titled “OnPlayerLeft”protected virtual void OnPlayerLeft(IPlayer player);Parameters
playerIPlayer
OnSessionChanged
Section titled “OnSessionChanged”protected virtual void OnSessionChanged(SessionKind session);Parameters
sessionSessionKind
OnStartAsync
Section titled “OnStartAsync”protected virtual ValueTask OnStartAsync(CancellationToken cancellationToken);Parameters
cancellationTokenCancellationToken
Returns ValueTask
OnStopAsync
Section titled “OnStopAsync”protected virtual ValueTask OnStopAsync(CancellationToken cancellationToken);Parameters
cancellationTokenCancellationToken
Returns ValueTask
OnTick
Section titled “OnTick”protected virtual void OnTick(TimeSpan delta);Parameters
deltaTimeSpan
OnVehicleDespawned
Section titled “OnVehicleDespawned”protected virtual void OnVehicleDespawned(IVehicle vehicle);Parameters
vehicleIVehicle
OnVehicleSpawned
Section titled “OnVehicleSpawned”protected virtual void OnVehicleSpawned(IVehicle vehicle);Parameters
vehicleIVehicle
OnWeatherChanged
Section titled “OnWeatherChanged”protected virtual void OnWeatherChanged(WorldWeather weather);Parameters
weatherWorldWeather
