Vertices Engine
v1.9.2.92
A Cross Platform game engine developed by Virtex Edge Design.
|
This screen implements the actual game logic. It is just a placeholder to get the idea across: you'll probably want to put some more interesting gameplay in here! More...
Public Member Functions | |
vxGameplaySceneBase (vxStartGameMode sandboxStartGameType=vxStartGameMode.GamePlay, string FilePath="", int NumberOfPlayers=1) | |
Initializes a new instance of the T:VerticesEngine.vxSceneBase class. | |
override void | LoadContent () |
Load graphics content for the game. | |
override void | UnloadContent () |
Unload graphics content used by the game. | |
void | DebugMethodCall (string method, ConsoleColor ConsoleColor=ConsoleColor.Yellow) |
T | GetSubSystem< T > () |
Get the subsystem of type T | |
bool | TryGetSubSystem< T > (out T subSystem) |
Tries to get the subsystem of type T | |
virtual vxFileInfo | GetFileInfo () |
virtual void | SaveFile (bool takeScreenshot, bool DoDump=false) |
Saves the current Sandbox File. | |
virtual vxSaveBusyScreen | GetAsyncSaveScreen () |
Gets the async save screen. Override this to provide a custom save screeen. | |
virtual void | SaveSupportFiles () |
Saves the support files such as as thumbnail and img. Override to add your own files. | |
virtual string | GetExporterInfo () |
This is a Verbose Debug info for which game saved the file. | |
virtual void | AddForDisposal (vxEntity entity) |
virtual vxSerializableSceneBaseData | InitSaveFile () |
Initialises the Save File. If the XML Save file uses a different type, then this can be overridden. | |
virtual vxSerializableSceneBaseData | DeserializeFile (string path) |
Returns a Deserializes the File. If you want to use a different type to Serialise than the base 'vxSerializableScene3DData' then you must override this or it will throw an error. | |
virtual void | DumpFile () |
virtual void | PackFile () |
void | SpawnParticle (object key, vxGameObject emitter) |
Spawns a new particle using the specified key from the Particle System. | |
virtual void | SimulationStart () |
virtual void | SimulationStop () |
virtual void | ShowPauseScreen () |
This Method Loads the Engine Base Pause Screen (PauseMenuScreen()), but more items might be needed to be added. Override to load your own Pause Screen. | |
virtual void | DrawBackground () |
Draw's the background before proceeding with other drawing. This is useful for Skyboxes and backgrounds as a whole. | |
override void | Draw () |
Draws the gameplay screen. | |
virtual void | DrawScene () |
Draws the scene. | |
Public Member Functions inherited from VerticesEngine.vxBaseScene | |
virtual System.Collections.IEnumerator | LoadContentAsync () |
Loads content as part of a Coroutine allowing the game to update frames during the loading process. | |
virtual bool | PlaySound (vxBaseScene sender, SoundEffect SoundEffect, float Volume=1, float Pitch=0) |
void | ExitScreen () |
Tells the screen to go away. Unlike ScreenManager.RemoveScreen, which instantly kills the screen, this method respects the transition timings and will give the screen a chance to gradually transition off. | |
virtual void | Dispose () |
Public Attributes | |
List< vxUtilCamera3D > | UtilCameras = new List<vxUtilCamera3D>() |
ContentManager | SceneContent |
The content manager for this scene. This is unloaded at the end of the scene. | |
vxNetworkGameType | NetGameType = vxNetworkGameType.Local |
The type of the game, whether its a Local game or Networked. | |
bool | IsStartBackground = false |
Is this level the start background. | |
bool | IsGUIVisible = true |
Should the GUI be shown? | |
bool | IsSceneDimmedOnCover = true |
Whether or not to dim the scene when it's covered by another screen. | |
readonly int | NumberOfPlayers |
The number of players in this Scene. This must be set in the constructor. | |
float | PauseAlpha |
This is the Pause Alpha Amount based off of the poisition the screen is in terms of transitioning too a new screen. | |
bool | IsPausable = true |
Gets or sets a value indicating whether this instance is pausable. | |
vxViewportManager | ViewportManager |
The viewport manager. | |
bool | IsDumping = false |
vxSerializableSceneBaseData | SandBoxFile |
File Format. | |
Texture2D | ThumbnailImage |
A thumbnail of the latest run. | |
string | FilePath = "" |
string | FileName = "sandboxFile1" |
vxOpenSandboxFileDialog | OpenFileDialog |
An in game Open File Dialog too access files from specific directories. | |
Color | BackBufferClearColor = Color.DarkMagenta |
The color to clear the back buffer with. | |
bool | IsUIVisibilitySuppressed = false |
Is the UI Visibility suppressed. This is useful for certain cases in Screen shots. | |
Static Public Attributes | |
const string | IMG_PREVIEW_FILE_NAME = "preview.jpg" |
const string | IMG_THUMBNAIL_FILE_NAME = "thumbnail.png" |
Protected Member Functions | |
virtual void | InitialisePhysics () |
Initialises the physics engine for this scene. | |
virtual void | InitialiseCameras () |
Initialises the cameras for this scene. | |
virtual void | OnInitialiseGUI () |
virtual void | InitialiseViewportManager () |
Initialises the Viewport Manager. | |
virtual void | RegisterSandboxEntities () |
virtual void | SetupObjectPools () |
virtual void | UnloadObjectPools () |
virtual void | InitialiseSubSystems () |
Initialise your scenes subsystems here. | |
virtual void | LoadParticlePools () |
virtual T | AddSystem< T > () |
Add a subsystem of type vxISceneSubSystem. It must be scene subsystem. | |
virtual vxSandboxFileLoadResult | LoadFile (string FilePath) |
virtual void | OnFileInfoLoad (vxFileInfo fileInfo) |
When File Info is Loaded. This is called before LoadFile(...) is called. | |
virtual vxSandboxFileLoadResult | LoadXMLFile (string FilePath, int version) |
virtual Point | GetPreviewImageSize () |
virtual Point | GetThumbnailImageSize () |
virtual void | OnLevelEditorNewFileToolbarItemClicked (object sender, vxUIControlClickEventArgs e) |
Start a New File. | |
virtual void | OnLevelEditorNewFilePromptAccepted (object sender, PlayerIndexEventArgs e) |
When to do when the New File button is clicked. This must be overridden. | |
virtual vxGameplaySceneBase | OnNewSandbox () |
Called when a New Sandbox file is called. Override this to provide your base class. | |
virtual void | OnLevelEditorOpenFileToolbarItemClicked (object sender, vxUIControlClickEventArgs e) |
Event for Opening a File. | |
virtual void | OnLevelEditorOpenFileDialogPromptAccepted (vxFileDialogItem file) |
virtual vxGameplaySceneBase | OnOpenSandboxFile (string filePath) |
Called when a New Sandbox file is called. Override this to provide your base class. | |
virtual void | OnLevelEditorSaveBeforeCloseCheck_Accepted (object sender, PlayerIndexEventArgs e) |
virtual void | OnLevelEditorSaveBeforeCloseCheck_DontSave (object sender, PlayerIndexEventArgs e) |
virtual void | SaveFileAs (string saveAsMsg="Save the current file as...") |
virtual void | OnLevelEditorSaveFileToolbarItemClicked (object sender, vxUIControlClickEventArgs e) |
Event for Saving the Current File. | |
virtual void | OnLevelEditorSaveAsFileToolbarItemClicked (object sender, vxUIControlClickEventArgs e) |
Event for Saving As the Current File. | |
virtual void | HandleInputBase () |
Handles the input base. | |
Protected Member Functions inherited from VerticesEngine.vxBaseScene | |
virtual void | OnFirstUpdate () |
Called at the start of this scenes first update/tick. | |
virtual void | OnFirstDraw () |
Called on the first draw of this scene. | |
Protected Attributes | |
bool | IsSandbox = true |
Is this a sandbox scene, if so then we will load any and all registered types. Otherwise you'll. | |
Dictionary< string, Type > | TypeRegister = new Dictionary<string, Type>() |
List< vxEntity > | DisposalQueue = new List<vxEntity>() |
Protected Attributes inherited from VerticesEngine.vxBaseScene | |
bool | IsLoadingTimeMeasured = false |
bool | HideIfCovered = true |
Properties | |
List< vxCamera > | Cameras [get] |
The cameras collection. | |
vxParticleSystemManager | ParticleSystem [get] |
The particle system. | |
vxIPlayerProfile | PlayerProfile [get] |
vxUIManager | UIManager [get] |
The Scene UI Manager. | |
string | Title [get, set] |
The Level Title. | |
string | Description [get, set] |
The Level Description. | |
string | WorkshopID [get, set] |
Texture2D | DefaultTexture [get] |
Gets the default texture. | |
vxCommandManager | CommandManager [get] |
The command manager to handle undo redos. | |
List< vxEntity > | Entities [get] |
The entity collection for this Scene. | |
List< vxEntity3D > | EditorEntities [get] |
Editor Entities. | |
vxEnumSandboxStatus | SandboxCurrentState [get, set] |
Is the Sandbox In Testing Mode. | |
vxStartGameMode | SandboxStartGameType [get, set] |
virtual bool | IsSandboxLevelContentFile [get] |
Is the sandbox level a content file or external/DLC? | |
Texture2D | PreviewImage [get, set] |
The preview image used for this level. | |
bool | IsNewSandboxFile [get] |
Returns back whether this is a new sandbox file. | |
Properties inherited from VerticesEngine.vxBaseScene | |
bool | IsPopup [get, protected set] |
Normally when one screen is brought up over the top of another, the first screen will transition off to make room for the new one. This property indicates whether the screen is only a small popup, in which case screens underneath it do not need to bother transitioning off. | |
bool | IsRemoved [get, set] |
Has this scene been removed? | |
TimeSpan | TransitionOnTime [get, protected set] |
Indicates how long the screen takes to transition on when it is activated. | |
TimeSpan | TransitionOffTime [get, protected set] |
Indicates how long the screen takes to transition off when it is deactivated. | |
float | TransitionPosition [get, protected set] |
Gets the current position of the screen transition, ranging from zero (fully active, no transition) to one (transitioned fully off to nothing). | |
float | TransitionAlpha [get] |
Gets the current alpha of the screen transition, ranging from 1 (fully active, no transition) to 0 (transitioned fully off to nothing). | |
ScreenState | ScreenState [get, protected set] |
Gets the current screen transition state. | |
bool | IsExiting [get, set] |
There are two possible reasons why a screen might be transitioning off. It could be temporarily going away to make room for another screen that is on top of it, or it could be going away for good. This property indicates whether the screen is exiting for real: if set, the screen will automatically remove itself as soon as the transition finishes. | |
bool | IsActive [get] |
Checks whether this screen is active and can respond to user input. | |
bool | otherScreenHasFocus [get, set] |
bool | IsFirstLoop [get] |
Gets a value indicating whether this T:VerticesEngine.vxGameBaseScreen is first loop. | |
bool | IsLoadingFile [get, set] |
Returns whether we're currently loading a file or not. | |
PlayerIndex? | ControllingPlayer [get, set] |
Gets the index of the player who is currently controlling this screen, or null if it is accepting input from any player. This is used to lock the game to a specific player profile. The main menu responds to input from any connected gamepad, but whichever player makes a selection from this menu is given control over all subsequent screens, so other gamepads are inactive until the controlling player returns to the main menu. | |
bool | IsContentLoaded [get, set] |
Has all the content been loaded yet? | |
bool | coveredByOtherScreen [get, set] |
This screen implements the actual game logic. It is just a placeholder to get the idea across: you'll probably want to put some more interesting gameplay in here!
VerticesEngine.vxGameplaySceneBase.vxGameplaySceneBase | ( | vxStartGameMode | sandboxStartGameType = vxStartGameMode::GamePlay, |
string | FilePath = "", | ||
int | NumberOfPlayers = 1 ) |
Initializes a new instance of the T:VerticesEngine.vxSceneBase class.
sandboxStartGameType | Sandbox start game type. |
FilePath | File path. |
NumberOfPlayers | Number of players. |
|
protectedvirtual |
Add a subsystem of type vxISceneSubSystem. It must be scene subsystem.
T |
Exception |
T | : | vxISceneSubSystem |
|
virtual |
Returns a Deserializes the File. If you want to use a different type to Serialise than the base 'vxSerializableScene3DData' then you must override this or it will throw an error.
Reimplemented in VerticesEngine.vxGameplayScene3D.
|
virtual |
Draws the gameplay screen.
Reimplemented from VerticesEngine.vxBaseScene.
|
virtual |
Draws the scene.
gameTime | Game time. |
Reimplemented in VerticesEngine.vxGameplayScene2D, and VerticesEngine.Screens.vxModelViewer.
|
virtual |
Gets the async save screen. Override this to provide a custom save screeen.
Reimplemented in VerticesEngine.vxGameplayScene2D, and VerticesEngine.vxGameplayScene3D.
|
virtual |
This is a Verbose Debug info for which game saved the file.
T VerticesEngine.vxGameplaySceneBase.GetSubSystem< T > | ( | ) |
Get the subsystem of type T
T |
T | : | vxISubSystem |
|
protectedvirtual |
Handles the input base.
input | Input. |
Reimplemented in VerticesEngine.vxGameplayScene2D, and VerticesEngine.vxGameplayScene3D.
|
protectedvirtual |
Initialises the cameras for this scene.
Reimplemented in VerticesEngine.vxGameplayScene2D, and VerticesEngine.vxGameplayScene3D.
|
protectedvirtual |
Initialises the physics engine for this scene.
Reimplemented in VerticesEngine.vxGameplayScene2D, and VerticesEngine.vxGameplayScene3D.
|
protectedvirtual |
Initialise your scenes subsystems here.
Reimplemented in VerticesEngine.vxGameplayScene3D.
|
virtual |
Initialises the Save File. If the XML Save file uses a different type, then this can be overridden.
Reimplemented in VerticesEngine.vxGameplayScene3D.
|
virtual |
Load graphics content for the game.
Reimplemented from VerticesEngine.vxBaseScene.
Reimplemented in VerticesEngine.Screens.vxModelViewer.
|
protectedvirtual |
When File Info is Loaded. This is called before LoadFile(...) is called.
fileInfo | File info. |
|
protectedvirtual |
Reimplemented in VerticesEngine.vxGameplayScene3D.
|
protectedvirtual |
When to do when the New File button is clicked. This must be overridden.
sender | |
e |
|
protectedvirtual |
Start a New File.
sender | |
e |
|
protectedvirtual |
Event for Opening a File.
sender | |
e |
|
protectedvirtual |
Event for Saving As the Current File.
sender | |
e |
|
protectedvirtual |
Event for Saving the Current File.
sender | |
e |
|
protectedvirtual |
Called when a New Sandbox file is called. Override this to provide your base class.
Reimplemented in VerticesEngine.vxGameplayScene3D.
|
protectedvirtual |
Called when a New Sandbox file is called. Override this to provide your base class.
|
protectedvirtual |
Reimplemented in VerticesEngine.vxGameplayScene3D.
|
virtual |
Saves the current Sandbox File.
takeScreenshot |
|
virtual |
This Method Loads the Engine Base Pause Screen (PauseMenuScreen()), but more items might be needed to be added. Override to load your own Pause Screen.
This sample shows how to override the ShowPauseScreen method. 'MyGamesCustomPauseScreen()' inheirts from the VerticesEngine.UI.Menus.vxMenuBaseScreen Class.
Reimplemented in VerticesEngine.vxGameplayScene3D.
|
virtual |
Reimplemented in VerticesEngine.vxGameplayScene3D.
|
virtual |
Reimplemented in VerticesEngine.vxGameplayScene3D.
void VerticesEngine.vxGameplaySceneBase.SpawnParticle | ( | object | key, |
vxGameObject | emitter ) |
Spawns a new particle using the specified key from the Particle System.
key | |
emitter |
bool VerticesEngine.vxGameplaySceneBase.TryGetSubSystem< T > | ( | out T | subSystem | ) |
Tries to get the subsystem of type T
T |
subSystem |
T | : | vxISubSystem |
|
virtual |
Unload graphics content used by the game.
Reimplemented from VerticesEngine.vxBaseScene.
Reimplemented in VerticesEngine.Screens.vxModelViewer.
bool VerticesEngine.vxGameplaySceneBase.IsPausable = true |
Gets or sets a value indicating whether this instance is pausable.
true
if this instance is pausable; otherwise, false
.
|
get |
Gets the default texture.
The default texture.