Class InGamePresenter
- Namespace
- FrameOfReference.Presentation
- Assembly
- FrameOfReference.Presentation.dll
Main in-game interaction
public sealed class InGamePresenter : InteractivePresenter, IDisposable, IInputReceiver
- Inheritance
-
InGamePresenter
- Implements
- Inherited Members
- Extension Methods
Constructors
InGamePresenter(Engine, Universe)
Creates a new presenter for the actual running game
public InGamePresenter(Engine engine, Universe universe)
Parameters
Methods
HookIn()
public override void HookIn()
Remarks
Will internally call Initialize() first, if you didn't
HookOut()
public override void HookOut()
LockOn(string)
Sets SelectedPositionables to a single specific Entity and forces the Camera to stay close to it.
public void LockOn(string name)
Parameters
MovePositionables(IEnumerable<Positionable<Vector2>>, Vector2)
Moves one or more Positionable<TCoordinates>s to a new position.
protected override void MovePositionables(IEnumerable<Positionable<Vector2>> positionables, Vector2 target)
Parameters
positionables
IEnumerable<Positionable<Vector2>>The Positionable<TCoordinates>s to be moved.
target
Vector2The terrain position to move the
positionables
to.
PickPositionables(IEnumerable<Positionable<Vector2>>, bool)
Adds one or more Positionable<TCoordinates>s to SelectedPositionables.
protected override void PickPositionables(IEnumerable<Positionable<Vector2>> positionables, bool accumulate)
Parameters
positionables
IEnumerable<Positionable<Vector2>>The selected Positionable<TCoordinates>s.
accumulate
booltrue
when the user wants the new selection to be added to the old one.
PrepareSave()
Writes back data to Universe so that state gets stored in savegames.
public void PrepareSave()
ReleaseLock()
Releases a camera lock applied by LockOn(string).
public void ReleaseLock()
SwingCameraTo(string)
Switches from the current camera view to a new view using a cinematic effect.
public void SwingCameraTo(string name)
Parameters
name
stringThe Name of a CameraState<TCoordinates> stored in the Universe.