Search Results for

    Show / Hide Table of Contents

    Class Behavior

    Represents a Component that contains only logic, updatable through the Update() method.

    Inheritance
    object
    IdentifiableObject
    DependencyObject
    AttachableObject
    PrefabInstanceObject
    Component
    Behavior
    Animation3D
    FreeCamera3D
    AtmosphereController
    Spinner
    SoundEmitter3D
    SoundListener3D
    GazeBehavior
    LookAtBehavior
    Tagalong
    WorkActionUpdaterBehavior
    BaseSpatialMapping
    EyeGazeBehavior
    TestHandTracking
    TrackModelNode
    TrackQRCode
    TrackSpatialAnchor
    TrackXRDevice
    XRFeaturePointsRenderer
    XRLightEstimationBehavior
    ContactTestBehavior
    PhysicBody3D
    RayEmitter
    SetCollisionEvents
    SweepTestEmitter
    VideoPlayer
    Implements
    IDependencyObject
    Inherited Members
    Component.Owner
    Component.Managers
    Component.ShouldBeActivated
    Component.Clone()
    Component.Attach(Entity)
    Component.OnLoaded()
    Component.OnActivated()
    Component.Start()
    Component.OnDeactivated()
    Component.OnDestroy()
    PrefabInstanceObject.PrefabSource
    PrefabInstanceObject.RefreshPrefab(Prefab)
    PrefabInstanceObject.PrefabElementId
    PrefabInstanceObject.IsPrefabInstance
    PrefabInstanceObject.IsMissingPrefabSource
    AttachableObject.AttachableStateChanged
    AttachableObject.IsEnabled
    AttachableObject.State
    AttachableObject.IsLoaded
    AttachableObject.IsAttached
    AttachableObject.IsActivated
    AttachableObject.IsStarted
    AttachableObject.IsDestroyed
    AttachableObject.Destroy()
    AttachableObject.DependencyBroken()
    DependencyObject.Dependencies
    DependencyObject.OnDependencyRemoved
    IdentifiableObject.Id
    IdentifiableObject.IdHasChanged(Guid)
    Namespace: Evergine.Framework
    Assembly: Evergine.Framework.dll
    Syntax
    public abstract class Behavior : Component, IDependencyObject

    Constructors

    Behavior()

    Initializes a new instance of the Behavior class.

    Declaration
    protected Behavior()

    Behavior(FamilyType)

    Initializes a new instance of the Behavior class.

    Declaration
    protected Behavior(FamilyType family)
    Parameters
    Type Name Description
    FamilyType family

    The family.

    Properties

    Family

    Gets or sets the FamilyType. Every behavior is initialized with Family set to Default. Default behaviors are updated first, and any other behaviors with different FamilyType values are updated subsequently. Families that are not Default are updated in parallel (the list of Behavior of each FamilyType is updated in a non-deterministic sequential order). For example, if a game had three behaviors marked as "AI" and two marked as "Physics", it would launch two threads: one to update the AI behaviors and another to update the Physics ones. See FamilyType for more information.

    Declaration
    public FamilyType Family { get; protected set; }
    Property Value
    Type Description
    FamilyType

    UpdateOrder

    Gets or sets the update order. Behaviors are sorted according to this value in ascending order, so behaviors with lower values are updated before behaviors with higher values.

    Declaration
    [RenderProperty(Tooltip = "Behaviors are sorted according to this value in ascending order, so behaviors with lower values will be updated before behaviors with higher values")]
    public float UpdateOrder { get; set; }
    Property Value
    Type Description
    float

    The update order.

    Methods

    OnAttached()

    Invoked when the object is attached to the system.

    Declaration
    protected override bool OnAttached()
    Returns
    Type Description
    bool

    True if everything is OK.

    Overrides
    Component.OnAttached()

    OnDetach()

    Invoked when the object is detached.

    Declaration
    protected override void OnDetach()
    Overrides
    Component.OnDetach()

    Update(TimeSpan)

    Allows this instance to execute custom logic during its Update.

    Declaration
    protected abstract void Update(TimeSpan gameTime)
    Parameters
    Type Name Description
    TimeSpan gameTime

    The game time.

    Remarks

    This method will not be executed if the Component or the Entity owning it is not Active.

    Implements

    IDependencyObject

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX