Show / Hide Table of Contents

Class InteractionTriggerInfo

Wrapper struct for a Trigger (LMB/RMB/Interact) + a Modifier (Ctrl/Alt/Shift).

Inheritance
System.Object
InteractionTriggerInfo
Namespace: Eco.Shared.SharedTypes
Assembly: Eco.Shared.dll
Syntax
public sealed class InteractionTriggerInfo : ValueType
Remarks

Used to define the input needed to trigger an interaction.

Constructors

InteractionTriggerInfo(InteractionTrigger)

Declaration
public InteractionTriggerInfo(InteractionTrigger trigger)
Parameters
Type Name Description
InteractionTrigger trigger

InteractionTriggerInfo(InteractionTrigger, InteractionModifier)

Declaration
public InteractionTriggerInfo(InteractionTrigger trigger, InteractionModifier modifier)
Parameters
Type Name Description
InteractionTrigger trigger
InteractionModifier modifier

Fields

Modifier

Declaration
public InteractionModifier Modifier
Field Value
Type Description
InteractionModifier

Trigger

Declaration
public InteractionTrigger Trigger
Field Value
Type Description
InteractionTrigger

Methods

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

GetPriority()

Interactions with more resrictions are high priority. Count the modifiers and that's our priority.

Declaration
public int GetPriority()
Returns
Type Description
System.Int32

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String

Operators

Equality(InteractionTriggerInfo, InteractionTrigger)

Declaration
public static bool operator ==(InteractionTriggerInfo info, InteractionTrigger trigger)
Parameters
Type Name Description
InteractionTriggerInfo info
InteractionTrigger trigger
Returns
Type Description
System.Boolean

Equality(InteractionTriggerInfo, InteractionTriggerInfo)

Declaration
public static bool operator ==(InteractionTriggerInfo left, InteractionTriggerInfo right)
Parameters
Type Name Description
InteractionTriggerInfo left
InteractionTriggerInfo right
Returns
Type Description
System.Boolean

Implicit(InteractionTrigger to InteractionTriggerInfo)

Declaration
public static implicit operator InteractionTriggerInfo(InteractionTrigger trigger)
Parameters
Type Name Description
InteractionTrigger trigger
Returns
Type Description
InteractionTriggerInfo

Implicit(InteractionTriggerInfo to (InteractionTrigger, InteractionModifier))

Declaration
public static implicit operator (InteractionTrigger, InteractionModifier)(InteractionTriggerInfo info)
Parameters
Type Name Description
InteractionTriggerInfo info
Returns
Type Description
System.ValueTuple<InteractionTrigger, InteractionModifier>

Implicit((InteractionTrigger, InteractionModifier) to InteractionTriggerInfo)

Declaration
public static implicit operator InteractionTriggerInfo((InteractionTrigger, InteractionModifier) tuple)
Parameters
Type Name Description
System.ValueTuple<InteractionTrigger, InteractionModifier> tuple
Returns
Type Description
InteractionTriggerInfo

Inequality(InteractionTriggerInfo, InteractionTrigger)

Declaration
public static bool operator !=(InteractionTriggerInfo info, InteractionTrigger trigger)
Parameters
Type Name Description
InteractionTriggerInfo info
InteractionTrigger trigger
Returns
Type Description
System.Boolean

Inequality(InteractionTriggerInfo, InteractionTriggerInfo)

Declaration
public static bool operator !=(InteractionTriggerInfo left, InteractionTriggerInfo right)
Parameters
Type Name Description
InteractionTriggerInfo left
InteractionTriggerInfo right
Returns
Type Description
System.Boolean

Extension Methods

CommandLine.FeedFromCommandLine(Object)
CommandLine.ToCommandLineArgs(Object, Func<Object, Boolean>)
ListUtil.DepthFirstTraversal<T>(T, Func<T, IEnumerable<T>>)
EnumerableExtensions.SingleItemAsEnumerable<T>(T)
EventUtils.RaiseEvent<TEventArgs>(Object, String, TEventArgs)
PredicateUtils.MatchesAll<TEnumerable, T>(T, TEnumerable)
PredicateUtils.MatchesAll<T>(T, Func<T, Boolean>[])
PredicateUtils.MatchesAny<TEnumerable, T>(T, TEnumerable)
ReflectionUtils.PropertyValue<T>(Object, PropertyInfo)
ReflectionUtils.TryGetPropertyValueByName<T>(Object, String, out T)
ReflectionUtils.GetPropertyValueByName<T>(Object, String)
ReflectionUtils.SetPropertyByName(Object, String, Object)
ReflectionUtils.GetStructPropertyByName<T>(Object, String)
ReflectionUtils.GetStringPropertyByName(Object, String)
ReflectionUtils.ZipByProperty<T>(Object, Object, Object, Func<T, T, T>)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾