C# 클래스 PrinceGame.Player

상속: Sprite
파일 보기 프로젝트 열기: salvadorc17/Prince-Monogame

공개 메소드들

메소드 설명
Advance ( ) : void
Bump ( ) : void
Bump ( Enumeration priority ) : void
Bump ( Enumeration priority, Enumeration reverse ) : void
Burned ( Enumeration priority ) : void
CheckItemOnFloor ( ) : void
ClimbDown ( ) : void
ClimbFail ( ) : void
ClimbUp ( ) : void
Crawl ( ) : void
Crouch ( ) : void
Crouch ( Enumeration priority ) : void
Crouch ( Enumeration priority, System stoppable ) : void
Crouch ( Enumeration priority, System stoppable, Vector2 offset ) : void
Crouch ( System stoppable ) : void
Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void

Draws the animated player.

DrinkPotion ( ) : void
DrinkPotionBig ( ) : void
Engarde ( ) : void
Engarde ( Enumeration priority, System stoppable ) : void
Engarde ( Enumeration priority, System stoppable, Vector2 offset ) : void
Engarde ( System stoppable ) : void
GoDown ( ) : void
GoDown ( Enumeration priority ) : void
GoDown ( Enumeration priority, Vector2 offSet ) : void
GoDown ( Vector2 offSet ) : void
HandleCollisionsNew ( ) : void
Hang ( ) : void
HangDrop ( ) : void
HighJump ( ) : void
Impale ( ) : void
Impale ( Enumeration priority ) : void
JumpHangLong ( ) : void
JumpHangMed ( ) : void
OnReachedExit ( ) : void

Called when this player reaches the level's exit.

ParseInput ( Enumeration input ) : void
PickupSword ( ) : void
Player ( RoomNew room, Vector2 position, Point roomcoords, GraphicsDevice GraphicsDevice__1, SpriteEffects spriteEffect ) : System

Constructors a new player.

Question ( ) : void
RJumpFall ( ) : void
RJumpFall ( Enumeration priority ) : void
RJumpFall ( Enumeration priority, Enumeration reverse ) : void
Reset ( SpriteEffects spriteeffect ) : void
Reset ( Vector2 position, SpriteEffects spriteEffect ) : void

Resets the player to life.

Retreat ( ) : void
RunJump ( ) : void
RunStop ( ) : void
RunStop ( Enumeration priority ) : void
RunTurn ( ) : void
Stand ( ) : void
Stand ( Enumeration priority ) : void
Stand ( Enumeration priority, System stoppable ) : void
Stand ( bool stoppable ) : void
StandJump ( ) : void
StandJump ( Enumeration priority ) : void
StandUp ( ) : void
StandUp ( Enumeration priority ) : void
Start ( Vector2 position ) : void

Start position the player to life.

StartLevel ( RoomNew room ) : void
StartRunning ( ) : void
StepFall ( ) : void
StepFall ( Enumeration priority ) : void
StepFall ( Enumeration priority, Vector2 offSet ) : void
StepForward ( ) : void
Stoop ( ) : void
Stoop ( Enumeration priority ) : void
Stoop ( Enumeration priority, Vector2 offSet ) : void
Stoop ( Vector2 offSet ) : void
Strike ( ) : void
Strike ( Enumeration priority ) : void
Turn ( ) : void
Update ( GameTime gameTime, KeyboardState keyboardState, GamePadState gamePadState, TouchCollection touchState, AccelerometerState accelState, DisplayOrientation orientation ) : void

Handles input, performs physics, and animates the player sprite.

We pass in all of the input states so that our game is only polling the hardware once per frame. We also pass the game's orientation because when using the accelerometer, we need to reverse our motion when the orientation is in the LandscapeRight orientation.

비공개 메소드들

메소드 설명
GetInput ( KeyboardState keyboardState, GamePadState gamePadState, TouchCollection touchState, AccelerometerState accelState, DisplayOrientation orientation ) : Enumeration.Input

Gets player horizontal movement and jump commands from input.

IsDownOfBlock ( bool isForClimbDown ) : System.Nullable
IsFrontOfBlock ( bool isForHang ) : System.Nullable
LoadContent ( ) : void

Loads the player sprite sheet and sounds.

isBehind ( Rectangle tileBounds, Rectangle playerBounds ) : bool
isClimbable ( ) : Enumeration.State

Remnber: for example the top gate is x=3 y=1 first row bottom = 2 the top row = 0..

isClimbableDown ( ) : bool
isLoosable ( ) : bool

메소드 상세

Advance() 공개 메소드

public Advance ( ) : void
리턴 void

Bump() 공개 메소드

public Bump ( ) : void
리턴 void

Bump() 공개 메소드

public Bump ( Enumeration priority ) : void
priority Enumeration
리턴 void

Bump() 공개 메소드

public Bump ( Enumeration priority, Enumeration reverse ) : void
priority Enumeration
reverse Enumeration
리턴 void

Burned() 공개 메소드

public Burned ( Enumeration priority ) : void
priority Enumeration
리턴 void

CheckItemOnFloor() 공개 메소드

public CheckItemOnFloor ( ) : void
리턴 void

ClimbDown() 공개 메소드

public ClimbDown ( ) : void
리턴 void

ClimbFail() 공개 메소드

public ClimbFail ( ) : void
리턴 void

ClimbUp() 공개 메소드

public ClimbUp ( ) : void
리턴 void

Crawl() 공개 메소드

public Crawl ( ) : void
리턴 void

Crouch() 공개 메소드

public Crouch ( ) : void
리턴 void

Crouch() 공개 메소드

public Crouch ( Enumeration priority ) : void
priority Enumeration
리턴 void

Crouch() 공개 메소드

public Crouch ( Enumeration priority, System stoppable ) : void
priority Enumeration
stoppable System
리턴 void

Crouch() 공개 메소드

public Crouch ( Enumeration priority, System stoppable, Vector2 offset ) : void
priority Enumeration
stoppable System
offset Vector2
리턴 void

Crouch() 공개 메소드

public Crouch ( System stoppable ) : void
stoppable System
리턴 void

Draw() 공개 메소드

Draws the animated player.
public Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void
gameTime Microsoft.Xna.Framework.GameTime
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
리턴 void

DrinkPotion() 공개 메소드

public DrinkPotion ( ) : void
리턴 void

DrinkPotionBig() 공개 메소드

public DrinkPotionBig ( ) : void
리턴 void

Engarde() 공개 메소드

public Engarde ( ) : void
리턴 void

Engarde() 공개 메소드

public Engarde ( Enumeration priority, System stoppable ) : void
priority Enumeration
stoppable System
리턴 void

Engarde() 공개 메소드

public Engarde ( Enumeration priority, System stoppable, Vector2 offset ) : void
priority Enumeration
stoppable System
offset Vector2
리턴 void

Engarde() 공개 메소드

public Engarde ( System stoppable ) : void
stoppable System
리턴 void

GoDown() 공개 메소드

public GoDown ( ) : void
리턴 void

GoDown() 공개 메소드

public GoDown ( Enumeration priority ) : void
priority Enumeration
리턴 void

GoDown() 공개 메소드

public GoDown ( Enumeration priority, Vector2 offSet ) : void
priority Enumeration
offSet Vector2
리턴 void

GoDown() 공개 메소드

public GoDown ( Vector2 offSet ) : void
offSet Vector2
리턴 void

HandleCollisionsNew() 공개 메소드

public HandleCollisionsNew ( ) : void
리턴 void

Hang() 공개 메소드

public Hang ( ) : void
리턴 void

HangDrop() 공개 메소드

public HangDrop ( ) : void
리턴 void

HighJump() 공개 메소드

public HighJump ( ) : void
리턴 void

Impale() 공개 메소드

public Impale ( ) : void
리턴 void

Impale() 공개 메소드

public Impale ( Enumeration priority ) : void
priority Enumeration
리턴 void

JumpHangLong() 공개 메소드

public JumpHangLong ( ) : void
리턴 void

JumpHangMed() 공개 메소드

public JumpHangMed ( ) : void
리턴 void

OnReachedExit() 공개 메소드

Called when this player reaches the level's exit.
public OnReachedExit ( ) : void
리턴 void

ParseInput() 공개 메소드

public ParseInput ( Enumeration input ) : void
input Enumeration
리턴 void

PickupSword() 공개 메소드

public PickupSword ( ) : void
리턴 void

Player() 공개 메소드

Constructors a new player.
public Player ( RoomNew room, Vector2 position, Point roomcoords, GraphicsDevice GraphicsDevice__1, SpriteEffects spriteEffect ) : System
room RoomNew
position Vector2
roomcoords Point
GraphicsDevice__1 GraphicsDevice
spriteEffect SpriteEffects
리턴 System

Question() 공개 메소드

public Question ( ) : void
리턴 void

RJumpFall() 공개 메소드

public RJumpFall ( ) : void
리턴 void

RJumpFall() 공개 메소드

public RJumpFall ( Enumeration priority ) : void
priority Enumeration
리턴 void

RJumpFall() 공개 메소드

public RJumpFall ( Enumeration priority, Enumeration reverse ) : void
priority Enumeration
reverse Enumeration
리턴 void

Reset() 공개 메소드

public Reset ( SpriteEffects spriteeffect ) : void
spriteeffect SpriteEffects
리턴 void

Reset() 공개 메소드

Resets the player to life.
public Reset ( Vector2 position, SpriteEffects spriteEffect ) : void
position Vector2 The position to come to life at.
spriteEffect SpriteEffects
리턴 void

Retreat() 공개 메소드

public Retreat ( ) : void
리턴 void

RunJump() 공개 메소드

public RunJump ( ) : void
리턴 void

RunStop() 공개 메소드

public RunStop ( ) : void
리턴 void

RunStop() 공개 메소드

public RunStop ( Enumeration priority ) : void
priority Enumeration
리턴 void

RunTurn() 공개 메소드

public RunTurn ( ) : void
리턴 void

Stand() 공개 메소드

public Stand ( ) : void
리턴 void

Stand() 공개 메소드

public Stand ( Enumeration priority ) : void
priority Enumeration
리턴 void

Stand() 공개 메소드

public Stand ( Enumeration priority, System stoppable ) : void
priority Enumeration
stoppable System
리턴 void

Stand() 공개 메소드

public Stand ( bool stoppable ) : void
stoppable bool
리턴 void

StandJump() 공개 메소드

public StandJump ( ) : void
리턴 void

StandJump() 공개 메소드

public StandJump ( Enumeration priority ) : void
priority Enumeration
리턴 void

StandUp() 공개 메소드

public StandUp ( ) : void
리턴 void

StandUp() 공개 메소드

public StandUp ( Enumeration priority ) : void
priority Enumeration
리턴 void

Start() 공개 메소드

Start position the player to life.
public Start ( Vector2 position ) : void
position Vector2 The position to come to life at.
리턴 void

StartLevel() 공개 메소드

public StartLevel ( RoomNew room ) : void
room RoomNew
리턴 void

StartRunning() 공개 메소드

public StartRunning ( ) : void
리턴 void

StepFall() 공개 메소드

public StepFall ( ) : void
리턴 void

StepFall() 공개 메소드

public StepFall ( Enumeration priority ) : void
priority Enumeration
리턴 void

StepFall() 공개 메소드

public StepFall ( Enumeration priority, Vector2 offSet ) : void
priority Enumeration
offSet Vector2
리턴 void

StepForward() 공개 메소드

public StepForward ( ) : void
리턴 void

Stoop() 공개 메소드

public Stoop ( ) : void
리턴 void

Stoop() 공개 메소드

public Stoop ( Enumeration priority ) : void
priority Enumeration
리턴 void

Stoop() 공개 메소드

public Stoop ( Enumeration priority, Vector2 offSet ) : void
priority Enumeration
offSet Vector2
리턴 void

Stoop() 공개 메소드

public Stoop ( Vector2 offSet ) : void
offSet Vector2
리턴 void

Strike() 공개 메소드

public Strike ( ) : void
리턴 void

Strike() 공개 메소드

public Strike ( Enumeration priority ) : void
priority Enumeration
리턴 void

Turn() 공개 메소드

public Turn ( ) : void
리턴 void

Update() 공개 메소드

Handles input, performs physics, and animates the player sprite.
We pass in all of the input states so that our game is only polling the hardware once per frame. We also pass the game's orientation because when using the accelerometer, we need to reverse our motion when the orientation is in the LandscapeRight orientation.
public Update ( GameTime gameTime, KeyboardState keyboardState, GamePadState gamePadState, TouchCollection touchState, AccelerometerState accelState, DisplayOrientation orientation ) : void
gameTime Microsoft.Xna.Framework.GameTime
keyboardState Microsoft.Xna.Framework.Input.KeyboardState
gamePadState Microsoft.Xna.Framework.Input.GamePadState
touchState TouchCollection
accelState AccelerometerState
orientation DisplayOrientation
리턴 void