Inheritance Hierarchy
TinyPlatformer Game
Namespace: TinyPlatformer
Assembly: TinyPlatformer (in TinyPlatformer.exe) Version: 1.1.1.0 (1.1.1)
Syntax
The Game type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Game |
Load a map and bind keyboard controls to player actions
View code on GitHub |
Remarks
Examples
[Test, CloseAfterFirstFrame] public void PlayerDoesNotWantToMoveLeftOrRight() { Assert.IsFalse(player.WantsToGoLeft); Assert.IsFalse(player.WantsToGoRight); Assert.IsFalse(player.WantsToJump); }
[Test, CloseAfterFirstFrame] public void CursorLeftMakesPlayerWantToMoveLeft() { PressKey(Key.CursorLeft); Assert.IsTrue(player.WantsToGoLeft); Assert.IsFalse(player.WantsToGoRight); Assert.IsFalse(player.WantsToJump); }
[Test, CloseAfterFirstFrame] public void CursorRightMakesPlayerWantToMoveRight() { PressKey(Key.CursorRight); Assert.IsFalse(player.WantsToGoLeft); Assert.IsTrue(player.WantsToGoRight); Assert.IsFalse(player.WantsToJump); }
See Also