A 2D Farming RPG
This is just a simple 2D farming RPG game
|
This will get the information from serialiable object and populate these class Basically this will store the data in runtime. More...
Public Member Functions | |
GridPropertyDetails | GetGridPropertyDetails (int gridX, int gridY, Dictionary< string, GridPropertyDetails > gridPropertyDictionary) |
Return thr grid property details at the gridLocation for the supplied dictionary, or null if not found. More... | |
GridPropertyDetails | GetGridPropertyDetails (int gridX, int gridY) |
Get the grid property details for the tile at (gridX, gridY). If no grid property details exist null is returned and can assume that all grid property details values are null or false More... | |
void | ISaveableDeregister () |
Remove the iSaveableObjectList More... | |
void | ISaveableRegister () |
Add the iSaveableObjectList More... | |
void | ISaveableRestoreScene (string sceneName) |
Restore the previous scene when we revist to that scene. Scenario: We moved scene A to scene B. In this case, we saved current condition of scene A. Then we again move scene B to scene A. Now, we need to restore the scene A as it was before we moved away. More... | |
void | ISaveableStoreScene (string sceneName) |
Saves the grid property dictionary for the current scene. This gets called when we moving scene A to scene B. In this case, we need to save current condition of the scene A, and load the scene B. This function does that. More... | |
void | SetGridPropertyDetails (int gridX, int gridY, GridPropertyDetails gridPropertyDetails) |
Set the grid property details to gridPropertyDetails for the tile at (gridX, gridY) for current scene. More... | |
void | SetGridPropertyDetails (int gridX, int gridY, GridPropertyDetails gridPropertyDetails, Dictionary< string, GridPropertyDetails > gridPropertyDictionary) |
Set the grid property details to gridPropertyDetails for the tile at (gridX, gridY) for the gridPropertyDictionary. More... | |
void | ISaveableRegister () |
void | ISaveableDeregister () |
void | ISaveableStoreScene (string sceneName) |
void | ISaveableRestoreScene (string sceneName) |
Data Fields | |
Grid | m_Grid |
Protected Member Functions | |
override void | Awake () |
virtual void | Awake () |
Properties | |
string | ISaveableUniqueID [get, set] |
GameObjectSave | GameObjectSave [get, set] |
Properties inherited from SingletonMonobehaviour< GridPropertiesManager > | |
static T | Instance [get] |
Properties inherited from ISaveable | |
string | ISaveableUniqueID [get, set] |
GameObjectSave | GameObjectSave [get, set] |
Private Member Functions | |
void | OnEnable () |
Call ISaveableRegister to add the iSaveableObjectList Subscribe to after scene loaded event. More... | |
void | OnDisable () |
Call ISaveableDeregister to remove the iSaveableObjectList Unsubscribe from after scene loaded event. More... | |
void | Start () |
Call InitialiseGridProperties() More... | |
void | InitialiseGridProperties () |
This initialises the grid property dictionary with the values from the SO_GridProperties assets and stores the values for each scene in GamaObjectSave sceneData. More... | |
void | AfterSceneLoaded () |
Get the Grid. More... | |
Private Attributes | |
Dictionary< string, GridPropertyDetails > | m_GridPropertyDictionary |
SO_GridProperties[] | m_SOGridPropertiesArray = null |
string | m_ISaveableUniqueID |
GameObjectSave | m_GameObjectSave |
This will get the information from serialiable object and populate these class Basically this will store the data in runtime.
Definition at line 9 of file GridPropertiesManager.cs.
|
inlineprivate |
Get the Grid.
Definition at line 134 of file GridPropertiesManager.cs.
|
inlineprotectedvirtual |
Reimplemented from SingletonMonobehaviour< GridPropertiesManager >.
Definition at line 26 of file GridPropertiesManager.cs.
|
inline |
Get the grid property details for the tile at (gridX, gridY). If no grid property details exist null is returned and can assume that all grid property details values are null or false
Definition at line 171 of file GridPropertiesManager.cs.
|
inline |
Return thr grid property details at the gridLocation for the supplied dictionary, or null if not found.
gridX | |
gridY | |
gridPropertyDictionary |
Definition at line 146 of file GridPropertiesManager.cs.
|
inlineprivate |
This initialises the grid property dictionary with the values from the SO_GridProperties assets and stores the values for each scene in GamaObjectSave sceneData.
Definition at line 65 of file GridPropertiesManager.cs.
|
inline |
Remove the iSaveableObjectList
Implements ISaveable.
Definition at line 179 of file GridPropertiesManager.cs.
|
inline |
Add the iSaveableObjectList
Implements ISaveable.
Definition at line 187 of file GridPropertiesManager.cs.
|
inline |
Restore the previous scene when we revist to that scene. Scenario: We moved scene A to scene B. In this case, we saved current condition of scene A. Then we again move scene B to scene A. Now, we need to restore the scene A as it was before we moved away.
Implements ISaveable.
Definition at line 197 of file GridPropertiesManager.cs.
|
inline |
Saves the grid property dictionary for the current scene. This gets called when we moving scene A to scene B. In this case, we need to save current condition of the scene A, and load the scene B. This function does that.
Implements ISaveable.
Definition at line 216 of file GridPropertiesManager.cs.
|
inlineprivate |
Call ISaveableDeregister to remove the iSaveableObjectList Unsubscribe from after scene loaded event.
Definition at line 47 of file GridPropertiesManager.cs.
|
inlineprivate |
Call ISaveableRegister to add the iSaveableObjectList Subscribe to after scene loaded event.
Definition at line 37 of file GridPropertiesManager.cs.
|
inline |
Set the grid property details to gridPropertyDetails for the tile at (gridX, gridY) for current scene.
Definition at line 234 of file GridPropertiesManager.cs.
|
inline |
Set the grid property details to gridPropertyDetails for the tile at (gridX, gridY) for the gridPropertyDictionary.
gridX | |
gridY | |
gridPropertyDetails | |
gridPropertyDictionary |
Definition at line 246 of file GridPropertiesManager.cs.
|
inlineprivate |
Call InitialiseGridProperties()
Definition at line 56 of file GridPropertiesManager.cs.
|
private |
Definition at line 19 of file GridPropertiesManager.cs.
Grid GridPropertiesManager.m_Grid |
Definition at line 11 of file GridPropertiesManager.cs.
|
private |
Definition at line 12 of file GridPropertiesManager.cs.
|
private |
Definition at line 15 of file GridPropertiesManager.cs.
|
private |
Definition at line 13 of file GridPropertiesManager.cs.
|
getset |
Implements ISaveable.
Definition at line 21 of file GridPropertiesManager.cs.
|
getset |
Implements ISaveable.
Definition at line 17 of file GridPropertiesManager.cs.