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

A minecraft player.
Inheritance: Entity
Afficher le fichier Open project: SijmenSchoon/Sharpcraft Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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.
Résultat Microsoft.Xna.Framework.Graphics

SetDirection() public méthode

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

SetDirection() public méthode

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

SetOnGround() public méthode

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.
Résultat void

SetPosition() public méthode

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

SetPosition() public méthode

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).
Résultat void

SetStance() public méthode

Set this player's stance.
public SetStance ( double stance ) : void
stance double
Résultat void