Skip to content

SurfaceComponentFollowTarget Class

Add to a IScreenSurface to have the ViewPosition center on a specific object.

C#
public class SurfaceComponentFollowTarget : UpdateComponent, IComponent

Inheritance objectUpdateComponent

Implements IComponent

C#
public SurfaceComponentFollowTarget()

Target to have the surface follow.

C#
public IScreenObject? Target { get; set; }

Called when the component is added to a host.

C#
public override void OnAdded(IScreenObject host)

host IScreenObject
The host that added the component.

Called by a host on the update frame.

C#
public override void Update(IScreenObject hostObject, TimeSpan delta)

hostObject IScreenObject

delta TimeSpan
The time that has elapsed since this method was last called.