Class SurfaceComponentFollowTarget
Add to a IScreenSurface to have the ViewPosition center on a specific object.
Implements
Inherited Members
Namespace: SadConsole.Components
Assembly: SadConsole.dll
Syntax
public class SurfaceComponentFollowTarget : UpdateComponent, IComponent
Constructors
SurfaceComponentFollowTarget()
Declaration
public SurfaceComponentFollowTarget()
Properties
Target
Target to have the surface follow.
Declaration
public IScreenObject? Target { get; set; }
Property Value
Type | Description |
---|---|
IScreenObject |
Methods
OnAdded(IScreenObject)
Called when the component is added to a host.
Declaration
public override void OnAdded(IScreenObject host)
Parameters
Type | Name | Description |
---|---|---|
IScreenObject | host | The host that added the component. |
Overrides
Update(IScreenObject, TimeSpan)
Called by a host on the update frame.
Declaration
public override void Update(IScreenObject hostObject, TimeSpan delta)
Parameters
Type | Name | Description |
---|---|---|
IScreenObject | hostObject | |
TimeSpan | delta | The time that has elapsed since this method was last called. |