C# Class Sharpcraft.Library.Minecraft.Entities.Player

A minecraft player.
Inheritance: Entity
Datei anzeigen Open project: SijmenSchoon/Sharpcraft Class Usage Examples

Public Methods

Method Description
Player ( int entityId, string name, Microsoft.Xna.Framework.Graphics.Texture2D skin = null, Position position = null, LookDirection direction = null, double stance = 0.0 ) : Microsoft.Xna.Framework.Graphics

Initialize a new instance of Player.

SetDirection ( LookDirection direction ) : void

Set the direction in which this player is heading.

SetDirection ( float yaw, float pitch ) : void

Set the direction in which this player is heading.

SetOnGround ( bool onGround ) : void

Set whether or not this player is currently on the ground (not falling).

SetPosition ( Position position ) : void

Updates the world position of this player.

SetPosition ( double x, double y, double z ) : void

Updates the world position of this player.

SetStance ( double stance ) : void

Set this player's stance.

Method Details

Player() public method

Initialize a new instance of Player.
public Player ( int entityId, string name, Microsoft.Xna.Framework.Graphics.Texture2D skin = null, Position position = null, LookDirection direction = null, double stance = 0.0 ) : Microsoft.Xna.Framework.Graphics
entityId int The Entity ID of this player.
name string Name of the player.
skin Microsoft.Xna.Framework.Graphics.Texture2D The player skin.
position Position World position of the player (X,Y,Z).
direction LookDirection The direction the player is looking in (Yaw, Pitch).
stance double The stance of the player.
return Microsoft.Xna.Framework.Graphics

SetDirection() public method

Set the direction in which this player is heading.
public SetDirection ( LookDirection direction ) : void
direction LookDirection object defining the direction.
return void

SetDirection() public method

Set the direction in which this player is heading.
public SetDirection ( float yaw, float pitch ) : void
yaw float Yaw.
pitch float Pitch.
return void

SetOnGround() public method

Set whether or not this player is currently on the ground (not falling).
public SetOnGround ( bool onGround ) : void
onGround bool true if player is on ground (not falling), false otherwise.
return void

SetPosition() public method

Updates the world position of this player.
public SetPosition ( Position position ) : void
position Position Vector3 with XYZ position of player.
return void

SetPosition() public method

Updates the world position of this player.
public SetPosition ( double x, double y, double z ) : void
x double X position.
y double Y position.
z double Z position (height).
return void

SetStance() public method

Set this player's stance.
public SetStance ( double stance ) : void
stance double
return void