C# Класс Sharpcraft.Library.Minecraft.Entities.Player

A minecraft player.
Наследование: Entity
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

Player() публичный Метод

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.
Результат Microsoft.Xna.Framework.Graphics

SetDirection() публичный Метод

Set the direction in which this player is heading.
public SetDirection ( LookDirection direction ) : void
direction LookDirection object defining the direction.
Результат void

SetDirection() публичный Метод

Set the direction in which this player is heading.
public SetDirection ( float yaw, float pitch ) : void
yaw float Yaw.
pitch float Pitch.
Результат void

SetOnGround() публичный Метод

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.
Результат void

SetPosition() публичный Метод

Updates the world position of this player.
public SetPosition ( Position position ) : void
position Position Vector3 with XYZ position of player.
Результат void

SetPosition() публичный Метод

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).
Результат void

SetStance() публичный Метод

Set this player's stance.
public SetStance ( double stance ) : void
stance double
Результат void