A 2D Farming RPG
This is just a simple 2D farming RPG game
Loading...
Searching...
No Matches
SceneItemsManager Class Reference

Control store, restore, save and load functionality in the scene. More...

Inheritance diagram for SceneItemsManager:
Inheritance graph
Collaboration diagram for SceneItemsManager:
Collaboration graph

Public Member Functions

void InstantiateSceneItem (int itemCode, Vector3 itemPosition)
 For future. Use to instantiate a single SceneItem More...
 
void ISaveableDeregister ()
 Removing the current game object to iSaveableObjectList instance in SaveLoadManager More...
 
void ISaveableRegister ()
 Adding the current game object to iSaveableObjectList instance in SaveLoadManager More...
 
void ISaveableRestoreScene (string sceneName)
 Restore the scene More...
 
void ISaveableStoreScene (string sceneName)
 Remove old scene data Save all the information on new scene Add that back to the GameObjectSave More...
 
void ISaveableRegister ()
 
void ISaveableDeregister ()
 
void ISaveableStoreScene (string sceneName)
 
void ISaveableRestoreScene (string sceneName)
 

Protected Member Functions

override void Awake ()
 Call the base of singleton class Initialize variables. More...
 
virtual void Awake ()
 

Properties

string ISaveableUniqueID [get, set]
 
GameObjectSave GameObjectSave [get, set]
 
- Properties inherited from SingletonMonobehaviour< SceneItemsManager >
static T Instance [get]
 
- Properties inherited from ISaveable
string ISaveableUniqueID [get, set]
 
GameObjectSave GameObjectSave [get, set]
 

Private Member Functions

void AfterSceneLoad ()
 Find the game object of the parent More...
 
void DestroySceneItems ()
 Destroy Items currently in the scene More...
 
void InstantiateSceneItems (List< SceneItem > sceneItemList)
 Loop through all the scene items Then instantiate a game object for each SceneItem More...
 
void OnDisable ()
 Calls ISaveableDeregister Unsubscribe from AfterSceneLoad More...
 
void OnEnable ()
 Calls ISaveableRegister Subscribe to AfterSceneLoad More...
 

Private Attributes

Transform m_ParentItem
 
GameObject m_ItemPrefab = null
 
string iSaveableUniqueID
 
GameObjectSave m_GameObjectSave
 

Detailed Description

Control store, restore, save and load functionality in the scene.

Definition at line 9 of file SceneItemsManager.cs.

Member Function Documentation

◆ AfterSceneLoad()

void SceneItemsManager.AfterSceneLoad ( )
inlineprivate

Find the game object of the parent

Definition at line 25 of file SceneItemsManager.cs.

Here is the caller graph for this function:

◆ Awake()

override void SceneItemsManager.Awake ( )
inlineprotectedvirtual

Call the base of singleton class Initialize variables.

Reimplemented from SingletonMonobehaviour< SceneItemsManager >.

Definition at line 34 of file SceneItemsManager.cs.

◆ DestroySceneItems()

void SceneItemsManager.DestroySceneItems ( )
inlineprivate

Destroy Items currently in the scene

Definition at line 45 of file SceneItemsManager.cs.

Here is the caller graph for this function:

◆ InstantiateSceneItem()

void SceneItemsManager.InstantiateSceneItem ( int  itemCode,
Vector3  itemPosition 
)
inline

For future. Use to instantiate a single SceneItem

Definition at line 61 of file SceneItemsManager.cs.

Here is the call graph for this function:

◆ InstantiateSceneItems()

void SceneItemsManager.InstantiateSceneItems ( List< SceneItem sceneItemList)
inlineprivate

Loop through all the scene items Then instantiate a game object for each SceneItem

Definition at line 72 of file SceneItemsManager.cs.

Here is the caller graph for this function:

◆ ISaveableDeregister()

void SceneItemsManager.ISaveableDeregister ( )
inline

Removing the current game object to iSaveableObjectList instance in SaveLoadManager

Implements ISaveable.

Definition at line 109 of file SceneItemsManager.cs.

Here is the caller graph for this function:

◆ ISaveableRegister()

void SceneItemsManager.ISaveableRegister ( )
inline

Adding the current game object to iSaveableObjectList instance in SaveLoadManager

Implements ISaveable.

Definition at line 117 of file SceneItemsManager.cs.

Here is the caller graph for this function:

◆ ISaveableRestoreScene()

void SceneItemsManager.ISaveableRestoreScene ( string  sceneName)
inline

Restore the scene

Parameters
sceneName

Implements ISaveable.

Definition at line 126 of file SceneItemsManager.cs.

Here is the call graph for this function:

◆ ISaveableStoreScene()

void SceneItemsManager.ISaveableStoreScene ( string  sceneName)
inline

Remove old scene data Save all the information on new scene Add that back to the GameObjectSave

Parameters
sceneName

Implements ISaveable.

Definition at line 147 of file SceneItemsManager.cs.

◆ OnDisable()

void SceneItemsManager.OnDisable ( )
inlineprivate

Calls ISaveableDeregister Unsubscribe from AfterSceneLoad

Definition at line 90 of file SceneItemsManager.cs.

Here is the call graph for this function:

◆ OnEnable()

void SceneItemsManager.OnEnable ( )
inlineprivate

Calls ISaveableRegister Subscribe to AfterSceneLoad

Definition at line 100 of file SceneItemsManager.cs.

Here is the call graph for this function:

Field Documentation

◆ iSaveableUniqueID

string SceneItemsManager.iSaveableUniqueID
private

Definition at line 15 of file SceneItemsManager.cs.

◆ m_GameObjectSave

GameObjectSave SceneItemsManager.m_GameObjectSave
private

Definition at line 17 of file SceneItemsManager.cs.

◆ m_ItemPrefab

GameObject SceneItemsManager.m_ItemPrefab = null
private

Definition at line 13 of file SceneItemsManager.cs.

◆ m_ParentItem

Transform SceneItemsManager.m_ParentItem
private

Definition at line 11 of file SceneItemsManager.cs.

Property Documentation

◆ GameObjectSave

GameObjectSave SceneItemsManager.GameObjectSave
getset

Implements ISaveable.

Definition at line 20 of file SceneItemsManager.cs.

◆ ISaveableUniqueID

string SceneItemsManager.ISaveableUniqueID
getset

Implements ISaveable.

Definition at line 19 of file SceneItemsManager.cs.


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