Show / Hide Table of Contents

Class MountComponent

Inheritance
System.Object
WorldObjectComponent
MountComponent
Implements
ILinkable
IOwned
IController
IViewController
IHasUniversalID
IHasSerializableID
IRPCAuthChecks
System.ComponentModel.INotifyPropertyChanged
IThreadSafeSubscriptions
ISubscriptions<ThreadSafeSubscriptions>
ISubscriptions
IHasInteractions
IHasEnvVars
Inherited Members
WorldObjectComponent.IsRPCAuthorized(IWorldObserver, AccessType, Object[])
WorldObjectComponent.Initialize()
WorldObjectComponent.PostInitialize()
WorldObjectComponent.OnCreate()
WorldObjectComponent.Tick()
WorldObjectComponent.LateTick()
WorldObjectComponent.TryPickup(Player, InventoryChangeSet, Inventory, Boolean)
WorldObjectComponent.OnBeforeObjectMoved()
WorldObjectComponent.OnAfterObjectMoved()
WorldObjectComponent.OnLinkClicked(TooltipOrigin, TooltipClickContext, User)
WorldObjectComponent.UILinkContent()
WorldObjectComponent.Parent
WorldObjectComponent.Name
WorldObjectComponent.IconName
WorldObjectComponent.ForceActiveTab
WorldObjectComponent.ComponentPrefabName
WorldObjectComponent.ComponentTabName
WorldObjectComponent.Enabled
WorldObjectComponent.IsDestroyed
WorldObjectComponent.ShouldRequestEverything
WorldObjectComponent.Owners
WorldObjectComponent.ControllerID
WorldObjectComponent.IOwned.Deed
WorldObjectComponent.Subscriptions
WorldObjectComponent.PropertyChanged
Namespace: Eco.Gameplay.Components
Assembly: Eco.Gameplay.dll
Syntax
public sealed class MountComponent : WorldObjectComponent, ILinkable, IOwned, IController, IViewController, IHasUniversalID, IHasSerializableID, IRPCAuthChecks, INotifyPropertyChanged, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IHasInteractions, IHasEnvVars

Constructors

MountComponent()

Declaration
public MountComponent()

Fields

DismountEvent

global dismount event with user and seat

Declaration
public static ThreadSafeAction<User, int, MountComponent> DismountEvent
Field Value
Type Description
ThreadSafeAction<User, System.Int32, MountComponent>

MountEvent

global mount event with user and seat

Declaration
public static ThreadSafeAction<User, int, MountComponent> MountEvent
Field Value
Type Description
ThreadSafeAction<User, System.Int32, MountComponent>

Properties

Availability

Declaration
public override WorldObjectComponentClientAvailability Availability { get; }
Property Value
Type Description
WorldObjectComponentClientAvailability
Overrides
WorldObjectComponent.Availability

Driver

Declaration
public Player Driver { get; set; }
Property Value
Type Description
Player

FirstFreeSeatIndex

Looking for null value in occupants array. Returns index of array if found, -1 if not.

Declaration
public int FirstFreeSeatIndex { get; }
Property Value
Type Description
System.Int32

HasFreeSeat

Check for null values in occupants array. Returns true if found any.

Declaration
[EnvVar]
public bool HasFreeSeat { get; }
Property Value
Type Description
System.Boolean

IsMounted

Return true if any player is mounted.

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

MountedPlayers

Returns non-null collection with players that currently mounted.

Declaration
public IEnumerable<Player> MountedPlayers { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<Player>

MountedPlayersNames

Returns the name of all the mounted player. Returns an empty string if there are not occupants.

Declaration
public string MountedPlayersNames { get; }
Property Value
Type Description
System.String

MountValidation

Declaration
public List<Func<int, Player, Result>> MountValidation { get; }
Property Value
Type Description
System.Collections.Generic.List<System.Func<System.Int32, Player, Result>>

OccupantIDs

Declaration
public int[] OccupantIDs { get; }
Property Value
Type Description
System.Int32[]

PauseExhaustion

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

Seats

Count all seats Mount has.

Declaration
public int Seats { get; }
Property Value
Type Description
System.Int32

Methods

Destroy()

Useful when object is destroyed with players inside

Declaration
public override void Destroy()
Overrides
WorldObjectComponent.Destroy()

Dismount(Player)

Dismounts specific player from all occupied seats.

Declaration
public void Dismount(Player player)
Parameters
Type Name Description
Player player

Dismount(Int32)

Declaration
public void Dismount(int playerID)
Parameters
Type Name Description
System.Int32 playerID

DismountAll()

Declaration
public void DismountAll()

DismountAllWithAction(Action<Player>)

Declaration
public void DismountAllWithAction(Action<Player> action)
Parameters
Type Name Description
System.Action<Player> action

Initialize(Int32, Boolean)

Declaration
public void Initialize(int seats = 1, bool pauseExhaustion = true)
Parameters
Type Name Description
System.Int32 seats
System.Boolean pauseExhaustion

MountInteraction(Player, InteractionTriggerInfo, InteractionTarget)

Declaration
[Interaction]
public void MountInteraction(Player player, InteractionTriggerInfo trigger, InteractionTarget target)
Parameters
Type Name Description
Player player
InteractionTriggerInfo trigger
InteractionTarget target

MountSeat(Int32, Player)

Declaration
public void MountSeat(int seatIndex, Player player)
Parameters
Type Name Description
System.Int32 seatIndex
Player player

MountSeatOnFree(Player)

Mount player on first free seat through MountSeat(Int32, Player)

Declaration
public int MountSeatOnFree(Player player)
Parameters
Type Name Description
Player player
Returns
Type Description
System.Int32

OnPickup(Player)

dismount all in current mount on pickup.

Declaration
public override void OnPickup(Player player)
Parameters
Type Name Description
Player player
Overrides
WorldObjectComponent.OnPickup(Player)

TryDismountPlayer(Player)

Declaration
public void TryDismountPlayer(Player player)
Parameters
Type Name Description
Player player

Events

PlayerDismountedEvent

Called when a player dismounts (any of the seats)

Declaration
public event Action PlayerDismountedEvent
Event Type
Type Description
System.Action

PlayerMountedEvent

Called when a player mounts (any of the seats)

Declaration
public event Action PlayerMountedEvent
Event Type
Type Description
System.Action

Implements

ILinkable
IOwned
IController
IViewController
IHasUniversalID
IHasSerializableID
IRPCAuthChecks
System.ComponentModel.INotifyPropertyChanged
IThreadSafeSubscriptions
ISubscriptions<TSubscriptionsList>
ISubscriptions
IHasInteractions
IHasEnvVars

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾