Logo
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Attributes | Properties | List of all members
Yukar.Engine.GameMain Class Reference

A class that manages the entire game More...

Inheritance diagram for Yukar.Engine.GameMain:
SharpKmyBase::Task

Classes

struct  LoadedSe
 ID list of system sound effects More...
 
class  SpriteSurface
 Class for receiving sprite drawing results as RenderTexture More...
 

Public Types

enum  Scenes {
  NONE , LOADING , LOGO , TITLE ,
  MAP , BATTLE_TEST , PREVIEW_LAYOUT , LOADING_FOR_CONTINUE
}
 current game scene More...
 
enum  ViewCollisionFilter {
  OBJECT = 0x1 , TERRAIN = 0x2 , MAPCHR = 0x4 , RAYCAST = 0x8 ,
  ALL = 0xFF
}
 filter enum for collision debug display More...
 

Public Member Functions

Scenes getScenes ()
 
virtual bool IsDummy ()
 
void pushTask (Func< bool > task)
 
void clearTask (string nickname)
 
void clearTask (Func< bool > task)
 
void pushTask (string nickname, Func< bool > task)
 
bool hasTask (string nickname)
 
bool hasTask (Func< bool > task)
 
Func< bool > getTask (string nickname)
 
int getTaskCount (string nickname)
 
 GameMain ()
 
 GameMain (bool skipConvert)
 
override void initialize ()
 Allows the game to perform any initialization it needs to before starting to run. This is where it can query for any required services and load any non-graphic related content. Calling base.Initialize will enumerate through any components and initialize them as well. More...
 
override void finalize ()
 
void unload ()
 
void destroyScene ()
 
override void startFixedUpdate (float A_0)
 
override void afterAnimate (float A_0)
 
override void afterSimulate (float A_0)
 
override void update (float elapsed)
 
void updateCore (float elapsed)
 
void ReserveExit ()
 
bool IsExitReserved ()
 
void GameReset ()
 
void draw ()
 This is called when the game should draw itself. More...
 
void ReloadLoadingScene ()
 
void DrawLoadingScene ()
 
virtual void ChangeScene (Scenes scene, bool inIsResetCamera=true)
 
void Exit ()
 
string replaceForFormat (string str, Guid sender, bool forBackLog=false)
 
void ToggleViewCollider (ViewCollisionFilter filter)
 
void SetPhysicsDebugDrawContactPoints (bool flg)
 
void SetPhysicsDebugDrawConstraints (bool flg)
 
void CircleShadowResourceInitialize ()
 
- Public Member Functions inherited from SharpKmyBase::Task
 Task ()
 
void Release ()
 
virtual void initialize ()
 
virtual void update (float)
 
virtual void startFixedUpdate (float)
 
virtual void afterAnimate (float)
 
virtual void afterSimulate (float)
 
virtual void finalize ()
 

Static Public Member Functions

static bool isSystemResource (Common.Resource.ResourceItem inResourceItem)
 Determining whether the resource is a system project More...
 
static void setGameSpeed (float speed=-1)
 
static void setElapsedTime (float elapsed)
 
static float getElapsedTime ()
 
static float getRelativeParam60FPS ()
 
static bool IsPushedAndroidBackButton ()
 
static void AdjustViewport (float width, float height, float currentAspect, GameView gameview)
 
static void PushLog (DebugDialog.LogEntry.LogType type, string sender, string log, bool isParallel=false)
 
- Static Public Member Functions inherited from SharpKmyBase::Task
static void addTask (Task ^t)
 
static void removeTask (Task ^t)
 
static void run (bool flg)
 
static void onInitialize (void *managed)
 
static void onFinalize (void *managed)
 
static void onStartFixedUpdate (void *manged, float delta)
 
static void onAfterAnimate (void *manged, float delta)
 
static void onAfterSimulate (void *manged, float delta)
 
static void onUpdate (void *managed, float elapsed)
 
static void shutdown ()
 
static void setTimeScale (float)
 

Public Attributes

Common.Catalog catalog
 
Common.GameDataManager data
 
LoadedSe se
 
TitleScene titleScene
 
Common.DebugSettings debugSettings
 
DebugDialog debugDialog
 
DebugCastParamDialog castParamDialog
 
Popup.DebugPartySkillEdit debugPartySkillEdit
 
Popup.DebugPartyItemEdit debugPartyItemEdit
 
HwndGetter hwndGetter = new HwndGetter()
 
Func< bool > IsMainWindowActive = () => SharpKmy.Entry.isWindowActive()
 
Func< float > getScreenAspect
 
SharpKmyIO.Controller controller
 
TransitionUtil transitionUtil = new TransitionUtil()
 
bool exitDialogOpened = false
 
Action FormCloser
 
Action ToggleFullScreenHandler = null
 
Action< Action > DialogInvoker
 
Action< List< Tuple< string, DebugCastParamDialog.ParamType > >, DebugCastParamDialog.ParamDebugCastParamInitializer
 
List< LayoutManagerfreeLayouts = new List<LayoutManager>()
 
GameView gameView
 
List< string > commands
 
BattleTestStruct battleTestStruct
 
float lastFixedUpdateElapsed
 
float gameSpeed = 1
 
- Public Attributes inherited from SharpKmyBase::Task
subTaskobj
 
System::Runtime::InteropServices::GCHandle handle
 

Static Public Attributes

static bool sIsPlayEngine = true
 
static Vector2 halfOffset = new Vector2(0.5f, 0.5f)
 
static float sGameSpeed = 1.0f
 
static uint sDefaultDisplayID = Common.Util.GAMEMAINDISPLAYID
 

Protected Member Functions

void UpdateInput (float elapsed, List< bool > intputs)
 

Static Protected Attributes

static bool sPushedAndroidBackButton = false
 

Properties

MapScene mapScene [get]
 
CameraManager camManager = null [get, set]
 
static GameMain instance [get, set]
 
bool IsTestPlayMode [get]
 
bool IsTestPlayDialogMode [get, set]
 
bool IsDebugMode [get]
 
bool IsBattle2D [get]
 
bool ExitingPlayer [get]
 

Detailed Description

A class that manages the entire game

Member Enumeration Documentation

◆ Scenes

current game scene

Enumerator
NONE 
LOADING 
LOGO 
TITLE 
MAP 
BATTLE_TEST 
PREVIEW_LAYOUT 
LOADING_FOR_CONTINUE 

◆ ViewCollisionFilter

filter enum for collision debug display

Enumerator
OBJECT 
TERRAIN 
MAPCHR 
RAYCAST 
ALL 

Constructor & Destructor Documentation

◆ GameMain() [1/2]

Yukar.Engine.GameMain.GameMain ( )

◆ GameMain() [2/2]

Yukar.Engine.GameMain.GameMain ( bool  skipConvert)

Member Function Documentation

◆ AdjustViewport()

static void Yukar.Engine.GameMain.AdjustViewport ( float  width,
float  height,
float  currentAspect,
GameView  gameview 
)
static

◆ afterAnimate()

override void Yukar.Engine.GameMain.afterAnimate ( float  A_0)
virtual

Reimplemented from SharpKmyBase::Task.

◆ afterSimulate()

override void Yukar.Engine.GameMain.afterSimulate ( float  A_0)
virtual

Reimplemented from SharpKmyBase::Task.

◆ ChangeScene()

virtual void Yukar.Engine.GameMain.ChangeScene ( Scenes  scene,
bool  inIsResetCamera = true 
)
virtual

◆ CircleShadowResourceInitialize()

void Yukar.Engine.GameMain.CircleShadowResourceInitialize ( )

◆ clearTask() [1/2]

void Yukar.Engine.GameMain.clearTask ( Func< bool >  task)

◆ clearTask() [2/2]

void Yukar.Engine.GameMain.clearTask ( string  nickname)

◆ destroyScene()

void Yukar.Engine.GameMain.destroyScene ( )

◆ draw()

void Yukar.Engine.GameMain.draw ( )

This is called when the game should draw itself.

Parameters
gameTimeProvides a snapshot of timing values.

◆ DrawLoadingScene()

void Yukar.Engine.GameMain.DrawLoadingScene ( )

◆ Exit()

void Yukar.Engine.GameMain.Exit ( )

◆ finalize()

override void Yukar.Engine.GameMain.finalize ( )
virtual

Reimplemented from SharpKmyBase::Task.

◆ GameReset()

void Yukar.Engine.GameMain.GameReset ( )

◆ getElapsedTime()

static float Yukar.Engine.GameMain.getElapsedTime ( )
static

◆ getRelativeParam60FPS()

static float Yukar.Engine.GameMain.getRelativeParam60FPS ( )
static

◆ getScenes()

Scenes Yukar.Engine.GameMain.getScenes ( )

◆ getTask()

Func< bool > Yukar.Engine.GameMain.getTask ( string  nickname)

◆ getTaskCount()

int Yukar.Engine.GameMain.getTaskCount ( string  nickname)

◆ hasTask() [1/2]

bool Yukar.Engine.GameMain.hasTask ( Func< bool >  task)

◆ hasTask() [2/2]

bool Yukar.Engine.GameMain.hasTask ( string  nickname)

◆ initialize()

override void Yukar.Engine.GameMain.initialize ( )
virtual

Allows the game to perform any initialization it needs to before starting to run. This is where it can query for any required services and load any non-graphic related content. Calling base.Initialize will enumerate through any components and initialize them as well.

Reimplemented from SharpKmyBase::Task.

◆ IsDummy()

virtual bool Yukar.Engine.GameMain.IsDummy ( )
virtual

◆ IsExitReserved()

bool Yukar.Engine.GameMain.IsExitReserved ( )

◆ IsPushedAndroidBackButton()

static bool Yukar.Engine.GameMain.IsPushedAndroidBackButton ( )
static

◆ isSystemResource()

static bool Yukar.Engine.GameMain.isSystemResource ( Common.Resource.ResourceItem  inResourceItem)
static

Determining whether the resource is a system project

Parameters
inResourceItemresource
Returns

◆ PushLog()

static void Yukar.Engine.GameMain.PushLog ( DebugDialog.LogEntry.LogType  type,
string  sender,
string  log,
bool  isParallel = false 
)
static

◆ pushTask() [1/2]

void Yukar.Engine.GameMain.pushTask ( Func< bool >  task)

◆ pushTask() [2/2]

void Yukar.Engine.GameMain.pushTask ( string  nickname,
Func< bool >  task 
)

◆ ReloadLoadingScene()

void Yukar.Engine.GameMain.ReloadLoadingScene ( )

◆ replaceForFormat()

string Yukar.Engine.GameMain.replaceForFormat ( string  str,
Guid  sender,
bool  forBackLog = false 
)

◆ ReserveExit()

void Yukar.Engine.GameMain.ReserveExit ( )

◆ setElapsedTime()

static void Yukar.Engine.GameMain.setElapsedTime ( float  elapsed)
static

◆ setGameSpeed()

static void Yukar.Engine.GameMain.setGameSpeed ( float  speed = -1)
static

◆ SetPhysicsDebugDrawConstraints()

void Yukar.Engine.GameMain.SetPhysicsDebugDrawConstraints ( bool  flg)

◆ SetPhysicsDebugDrawContactPoints()

void Yukar.Engine.GameMain.SetPhysicsDebugDrawContactPoints ( bool  flg)

◆ startFixedUpdate()

override void Yukar.Engine.GameMain.startFixedUpdate ( float  A_0)
virtual

Reimplemented from SharpKmyBase::Task.

◆ ToggleViewCollider()

void Yukar.Engine.GameMain.ToggleViewCollider ( ViewCollisionFilter  filter)

◆ unload()

void Yukar.Engine.GameMain.unload ( )

◆ update()

override void Yukar.Engine.GameMain.update ( float  elapsed)
virtual

Reimplemented from SharpKmyBase::Task.

◆ updateCore()

void Yukar.Engine.GameMain.updateCore ( float  elapsed)

◆ UpdateInput()

void Yukar.Engine.GameMain.UpdateInput ( float  elapsed,
List< bool >  intputs 
)
protected

Member Data Documentation

◆ battleTestStruct

BattleTestStruct Yukar.Engine.GameMain.battleTestStruct

◆ castParamDialog

DebugCastParamDialog Yukar.Engine.GameMain.castParamDialog

◆ catalog

Common.Catalog Yukar.Engine.GameMain.catalog

◆ commands

List<string> Yukar.Engine.GameMain.commands

◆ controller

SharpKmyIO.Controller Yukar.Engine.GameMain.controller

◆ data

Common.GameDataManager Yukar.Engine.GameMain.data

◆ DebugCastParamInitializer

Action<List<Tuple<string, DebugCastParamDialog.ParamType> >, DebugCastParamDialog.Param> Yukar.Engine.GameMain.DebugCastParamInitializer

◆ debugDialog

DebugDialog Yukar.Engine.GameMain.debugDialog

◆ debugPartyItemEdit

Popup.DebugPartyItemEdit Yukar.Engine.GameMain.debugPartyItemEdit

◆ debugPartySkillEdit

Popup.DebugPartySkillEdit Yukar.Engine.GameMain.debugPartySkillEdit

◆ debugSettings

Common.DebugSettings Yukar.Engine.GameMain.debugSettings

◆ DialogInvoker

Action<Action> Yukar.Engine.GameMain.DialogInvoker

◆ exitDialogOpened

bool Yukar.Engine.GameMain.exitDialogOpened = false

◆ FormCloser

Action Yukar.Engine.GameMain.FormCloser

◆ freeLayouts

List<LayoutManager> Yukar.Engine.GameMain.freeLayouts = new List<LayoutManager>()

◆ gameSpeed

float Yukar.Engine.GameMain.gameSpeed = 1

◆ gameView

GameView Yukar.Engine.GameMain.gameView

◆ getScreenAspect

Func<float> Yukar.Engine.GameMain.getScreenAspect
Initial value:
= () =>
{
return Graphics.GetScreenAspect();
}

◆ halfOffset

Vector2 Yukar.Engine.GameMain.halfOffset = new Vector2(0.5f, 0.5f)
static

◆ hwndGetter

HwndGetter Yukar.Engine.GameMain.hwndGetter = new HwndGetter()

◆ IsMainWindowActive

Func<bool> Yukar.Engine.GameMain.IsMainWindowActive = () => SharpKmy.Entry.isWindowActive()

◆ lastFixedUpdateElapsed

float Yukar.Engine.GameMain.lastFixedUpdateElapsed

◆ sDefaultDisplayID

uint Yukar.Engine.GameMain.sDefaultDisplayID = Common.Util.GAMEMAINDISPLAYID
static

◆ se

LoadedSe Yukar.Engine.GameMain.se

◆ sGameSpeed

float Yukar.Engine.GameMain.sGameSpeed = 1.0f
static

◆ sIsPlayEngine

bool Yukar.Engine.GameMain.sIsPlayEngine = true
static

◆ sPushedAndroidBackButton

bool Yukar.Engine.GameMain.sPushedAndroidBackButton = false
staticprotected

◆ titleScene

TitleScene Yukar.Engine.GameMain.titleScene

◆ ToggleFullScreenHandler

Action Yukar.Engine.GameMain.ToggleFullScreenHandler = null

◆ transitionUtil

TransitionUtil Yukar.Engine.GameMain.transitionUtil = new TransitionUtil()

Property Documentation

◆ camManager

CameraManager Yukar.Engine.GameMain.camManager = null
getset

◆ ExitingPlayer

bool Yukar.Engine.GameMain.ExitingPlayer
get

◆ instance

GameMain Yukar.Engine.GameMain.instance
staticgetset

◆ IsBattle2D

bool Yukar.Engine.GameMain.IsBattle2D
get

◆ IsDebugMode

bool Yukar.Engine.GameMain.IsDebugMode
get

◆ IsTestPlayDialogMode

bool Yukar.Engine.GameMain.IsTestPlayDialogMode
getset

◆ IsTestPlayMode

bool Yukar.Engine.GameMain.IsTestPlayMode
get

◆ mapScene

MapScene Yukar.Engine.GameMain.mapScene
get