YAPOG  0.0.1
Yet Another Pokemon Online Game
ycl::GameplayScreen Class Reference

#include <GameplayScreen.hpp>

Inheritance diagram for ycl::GameplayScreen:
Collaboration diagram for ycl::GameplayScreen:

List of all members.

Public Member Functions

 GameplayScreen (yap::IDrawingContext &context)
virtual ~GameplayScreen ()
- Public Member Functions inherited from ycl::BaseScreen
virtual ~BaseScreen ()
- Public Member Functions inherited from yap::GameScreen
 GameScreen (const ScreenType &type)
 Initializes a GameScreen with the ScreenType type.
virtual ~GameScreen ()
virtual void Init ()
 Called once after the add into a IGameScreenManager.
virtual void Activate ()
 Called each time this IGameScreen is slected to be run.
virtual void Deactivate ()
 Called each time this IGameScreen is not running anymore.
virtual void NextFrame ()
virtual const ScreenTypeRun (const Time &dt, IDrawingContext &context)
 Performs one frame of the screen life.
virtual const GuiManagerGetGuiManager () const
 Gets the root widget of this Screen.
virtual GuiManagerGetGuiManager ()
 Gets the root widget of this Screen.
virtual const ScreenTypeGetType () const
 Gets the unique type name of this Screen.
virtual Event< IGameScreen & > & OnGameExitedEvent ()
virtual bool OnEvent (const GuiEvent &guiEvent)
 Treats an event. Transferts the event before treating it.
virtual bool OnPriorityEvent (const GuiEvent &guiEvent)
 Treats an event. Treats the event before transfering it.
- Public Member Functions inherited from yap::IGameScreen
virtual ~IGameScreen ()
- Public Member Functions inherited from yap::IEventHandler
virtual ~IEventHandler ()

Protected Member Functions

virtual void HandleInit ()
 Behavior of Init.
virtual void HandleRun (const yap::Time &dt, yap::IDrawingContext &context)
 Behavior of Run.
virtual bool HandleOnEvent (const yap::GuiEvent &guiEvent)
 Behavior of OnEvent.
virtual void HandleActivate ()
 Behavior of Activate.
virtual void HandleDeactivate ()
 Behavior of Deactivate.
- Protected Member Functions inherited from ycl::BaseScreen
 BaseScreen (const yap::ScreenType &type, yap::IDrawingContext &context)
- Protected Member Functions inherited from yap::GameScreen
void ExitGame ()
virtual bool HandleOnPriorityEvent (const GuiEvent &guiEvent)
 Behavior of OnPriorityEvent.

Private Member Functions

 DISALLOW_COPY (GameplayScreen)
MapGetCurrentMap ()
void SetCurrentMap (Map &map)
void SetPlayer (Player *player)
void SetPlayerName ()
void UpdatePlayer (const yap::Time &dt)
void HandleOnPlayerWarped ()
void ResetMoveController ()
void SendApplyForce (const yap::Vector2 &force)
void SendGameInput (yap::GameInputType gameInputType, bool state)
void CreateWorldDrawingPolicy ()
virtual void CreateGuiManager ()

Private Attributes

World world_
const yap::IWorldDrawingPolicyworldDrawingPolicy_
yap::ProgressiveCameraController cameraController_
Playerplayer_
yap::CharacterMoveController moveController_
yap::Vector2 lastForce_
yap::Timer fpsDisplayTimer_
Widgets.
GameGuiManagergameGuiManager_
yap::GameWorldGuiManagergameWorldGuiManager_
MapRootWidgetmapRootWidget_
GameMainMenumainMenu_
PokedexWidgetpokedexWidget_
PokemonTeamWidgetpokemonTeamWidget_
TrainerCardWidgettrainerCardWidget_
ChatWidgetchat_
yap::LabelfpsLabel_

Static Private Attributes

static const yap::ScreenType DEFAULT_NAME = "Gameplay"
static const yap::Vector2 DEFAULT_WORLD_CAMERA_DEZOOM_FACTOR

Additional Inherited Members

- Protected Attributes inherited from ycl::BaseScreen
yap::IDrawingContextcontext_
Sessionsession_
yap::ContentManagercontentManager_
yap::ObjectFactoryobjectFactory_
yap::WorldObjectStateFactoryworldObjectStateFactory_
yap::GameInputManagergameInputManager_
yap::Loggerlogger_
- Protected Attributes inherited from yap::GameScreen
ScreenType nextScreen_
 Type of the Screen to be executed on next frame.
GuiManagerguiManager_
 Root widget if this GameScreen.

Detailed Description

Definition at line 31 of file GameplayScreen.hpp.


Constructor & Destructor Documentation

ycl::GameplayScreen::GameplayScreen ( yap::IDrawingContext context)
explicit

Definition at line 77 of file GameplayScreen.cpp.

ycl::GameplayScreen::~GameplayScreen ( )
virtual

Definition at line 98 of file GameplayScreen.cpp.


Member Function Documentation

void ycl::GameplayScreen::CreateGuiManager ( )
privatevirtual

Reimplemented from yap::GameScreen.

Definition at line 523 of file GameplayScreen.cpp.

void ycl::GameplayScreen::CreateWorldDrawingPolicy ( )
private

Definition at line 518 of file GameplayScreen.cpp.

Here is the caller graph for this function:

ycl::GameplayScreen::DISALLOW_COPY ( GameplayScreen  )
private
Map & ycl::GameplayScreen::GetCurrentMap ( )
private

Definition at line 397 of file GameplayScreen.cpp.

Here is the call graph for this function:

void ycl::GameplayScreen::HandleActivate ( )
protectedvirtual

Behavior of Activate.

Reimplemented from yap::GameScreen.

Definition at line 385 of file GameplayScreen.cpp.

Here is the call graph for this function:

void ycl::GameplayScreen::HandleDeactivate ( )
protectedvirtual

Behavior of Deactivate.

Reimplemented from yap::GameScreen.

Definition at line 392 of file GameplayScreen.cpp.

Here is the call graph for this function:

void ycl::GameplayScreen::HandleInit ( )
protectedvirtual

Behavior of Init.

Reimplemented from yap::GameScreen.

Definition at line 102 of file GameplayScreen.cpp.

Here is the call graph for this function:

bool ycl::GameplayScreen::HandleOnEvent ( const yap::GuiEvent guiEvent)
protectedvirtual

Behavior of OnEvent.

Reimplemented from yap::GameScreen.

Definition at line 259 of file GameplayScreen.cpp.

Here is the call graph for this function:

void ycl::GameplayScreen::HandleOnPlayerWarped ( )
private

Definition at line 490 of file GameplayScreen.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::GameplayScreen::HandleRun ( const yap::Time dt,
yap::IDrawingContext context 
)
protectedvirtual

Behavior of Run.

Reimplemented from yap::GameScreen.

Definition at line 239 of file GameplayScreen.cpp.

Here is the call graph for this function:

void ycl::GameplayScreen::ResetMoveController ( )
private

Definition at line 461 of file GameplayScreen.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::GameplayScreen::SendApplyForce ( const yap::Vector2 force)
private

Definition at line 495 of file GameplayScreen.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::GameplayScreen::SendGameInput ( yap::GameInputType  gameInputType,
bool  state 
)
private

Definition at line 505 of file GameplayScreen.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::GameplayScreen::SetCurrentMap ( Map map)
private

Definition at line 402 of file GameplayScreen.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::GameplayScreen::SetPlayer ( Player player)
private

Definition at line 412 of file GameplayScreen.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::GameplayScreen::SetPlayerName ( )
private
Todo:
Remove

Definition at line 424 of file GameplayScreen.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::GameplayScreen::UpdatePlayer ( const yap::Time dt)
private

Definition at line 469 of file GameplayScreen.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

yap::ProgressiveCameraController ycl::GameplayScreen::cameraController_
private

Definition at line 79 of file GameplayScreen.hpp.

ChatWidget* ycl::GameplayScreen::chat_
private

Definition at line 101 of file GameplayScreen.hpp.

const yap::ScreenType ycl::GameplayScreen::DEFAULT_NAME = "Gameplay"
staticprivate

Definition at line 72 of file GameplayScreen.hpp.

const yap::Vector2 ycl::GameplayScreen::DEFAULT_WORLD_CAMERA_DEZOOM_FACTOR
staticprivate

Definition at line 74 of file GameplayScreen.hpp.

yap::Timer ycl::GameplayScreen::fpsDisplayTimer_
private

Definition at line 85 of file GameplayScreen.hpp.

yap::Label* ycl::GameplayScreen::fpsLabel_
private

Definition at line 103 of file GameplayScreen.hpp.

GameGuiManager* ycl::GameplayScreen::gameGuiManager_
private

Definition at line 89 of file GameplayScreen.hpp.

yap::GameWorldGuiManager* ycl::GameplayScreen::gameWorldGuiManager_
private

Definition at line 91 of file GameplayScreen.hpp.

yap::Vector2 ycl::GameplayScreen::lastForce_
private

Definition at line 83 of file GameplayScreen.hpp.

GameMainMenu* ycl::GameplayScreen::mainMenu_
private

Definition at line 94 of file GameplayScreen.hpp.

MapRootWidget* ycl::GameplayScreen::mapRootWidget_
private

Definition at line 92 of file GameplayScreen.hpp.

yap::CharacterMoveController ycl::GameplayScreen::moveController_
private

Definition at line 82 of file GameplayScreen.hpp.

Player* ycl::GameplayScreen::player_
private

Definition at line 81 of file GameplayScreen.hpp.

PokedexWidget* ycl::GameplayScreen::pokedexWidget_
private

Definition at line 96 of file GameplayScreen.hpp.

PokemonTeamWidget* ycl::GameplayScreen::pokemonTeamWidget_
private

Definition at line 97 of file GameplayScreen.hpp.

TrainerCardWidget* ycl::GameplayScreen::trainerCardWidget_
private

Definition at line 99 of file GameplayScreen.hpp.

World ycl::GameplayScreen::world_
private

Definition at line 76 of file GameplayScreen.hpp.

const yap::IWorldDrawingPolicy* ycl::GameplayScreen::worldDrawingPolicy_
private

Definition at line 77 of file GameplayScreen.hpp.


The documentation for this class was generated from the following files: