Dungeon Architect  17.0.0
DungeonArchitect.PooledDungeonSceneProvider Class Reference

Implementation of the Scene provider that adds object pooling over the existing functionality. This is useful for quick rebuilding and better performance, as object in the scene are reused while rebuilding, instead of destroying everything and rebuilding More...

Inheritance diagram for DungeonArchitect.PooledDungeonSceneProvider:
DungeonArchitect.DungeonSceneProvider DungeonArchitect.NonPooledDungeonSceneProvider

Public Member Functions

override void OnDungeonBuildStart ()
 Called when build is started More...
 
override void OnDungeonBuildStop ()
 Called after build has ended More...
 
override GameObject AddSprite (SpriteDungeonThemeItem spriteProp, Matrix4x4 transform, IDungeonSceneObjectInstantiator objectInstantiator)
 Request the creation of a sprite object More...
 
override void InvalidateNodeCache (string NodeId)
 
override GameObject AddGameObject (GameObjectDungeonThemeItem gameObjectProp, Matrix4x4 transform, IDungeonSceneObjectInstantiator objectInstantiator)
 Request the creation of a game object More...
 
override GameObject AddGameObjectFromArray (GameObjectArrayDungeonThemeItem gameObjectArrayProp, int index, Matrix4x4 transform, IDungeonSceneObjectInstantiator objectInstantiator)
 Requests the creation of a game object from the provided list More...
 

Additional Inherited Members

- Public Attributes inherited from DungeonArchitect.DungeonSceneProvider
GameObject itemParent
 The parent for all spawned game objects. Assign this to create all spawned objects underneath it to avoid cluttering up the hierarchy More...
 
- Protected Member Functions inherited from DungeonArchitect.DungeonSceneProvider
void Initialize ()
 
GameObject BuildGameObject (GameObjectDungeonThemeItem gameObjectProp, Matrix4x4 transform, IDungeonSceneObjectInstantiator objectInstantiator)
 
GameObject BuildGameObjectFromArray (GameObjectArrayDungeonThemeItem gameObjectArrayProp, int index, Matrix4x4 transform, IDungeonSceneObjectInstantiator objectInstantiator)
 
GameObject BuildGameObject (GameObject template, string nodeId, bool affectsNavigation, Matrix4x4 transform, bool externallyManaged, IDungeonSceneObjectInstantiator objectInstantiator)
 
void FlipSpriteTransform (ref Matrix4x4 transform, Sprite sprite)
 
void FlipSpritePosition (ref Matrix4x4 transform)
 
void FlipSpritePosition (ref Vector3 position)
 
GameObject BuildSpriteObject (SpriteDungeonThemeItem spriteData, Matrix4x4 transform, string NodeId)
 
void SetTransform (Transform transform, Matrix4x4 matrix)
 
- Protected Attributes inherited from DungeonArchitect.DungeonSceneProvider
DungeonConfig config
 Dungeon config used by the builder More...
 
Dungeon dungeon
 The owning dungeon actor reference More...
 
Vector3 _position = new Vector3()
 
Quaternion _rotation = new Quaternion()
 
Vector3 _scale = new Vector3()
 

Detailed Description

Implementation of the Scene provider that adds object pooling over the existing functionality. This is useful for quick rebuilding and better performance, as object in the scene are reused while rebuilding, instead of destroying everything and rebuilding

Definition at line 15 of file PooledDungeonSceneProvider.cs.

Member Function Documentation

◆ AddGameObject()

override GameObject DungeonArchitect.PooledDungeonSceneProvider.AddGameObject ( GameObjectDungeonThemeItem  gameObjectProp,
Matrix4x4  transform,
IDungeonSceneObjectInstantiator  objectInstantiator 
)
virtual

Request the creation of a game object

Parameters
gameObjectPropThe template to use for instantiation
transformThe transform of the instantiated game object

Reimplemented from DungeonArchitect.DungeonSceneProvider.

Definition at line 93 of file PooledDungeonSceneProvider.cs.

◆ AddGameObjectFromArray()

override GameObject DungeonArchitect.PooledDungeonSceneProvider.AddGameObjectFromArray ( GameObjectArrayDungeonThemeItem  gameObjectArrayProp,
int  index,
Matrix4x4  transform,
IDungeonSceneObjectInstantiator  objectInstantiator 
)
virtual

Requests the creation of a game object from the provided list

Returns
The game object from array.
Parameters
gameObjectArrayPropGame object array property.
indexIndex.
transformTransform.

Reimplemented from DungeonArchitect.DungeonSceneProvider.

Definition at line 155 of file PooledDungeonSceneProvider.cs.

◆ AddSprite()

override GameObject DungeonArchitect.PooledDungeonSceneProvider.AddSprite ( SpriteDungeonThemeItem  spriteProp,
Matrix4x4  transform,
IDungeonSceneObjectInstantiator  objectInstantiator 
)
virtual

Request the creation of a sprite object

Parameters
spritePropThe sprite game object template reference
transformThe transform of the prop

Reimplemented from DungeonArchitect.DungeonSceneProvider.

Definition at line 50 of file PooledDungeonSceneProvider.cs.

◆ OnDungeonBuildStart()

override void DungeonArchitect.PooledDungeonSceneProvider.OnDungeonBuildStart ( )
virtual

Called when build is started

Reimplemented from DungeonArchitect.DungeonSceneProvider.

Definition at line 19 of file PooledDungeonSceneProvider.cs.

◆ OnDungeonBuildStop()

override void DungeonArchitect.PooledDungeonSceneProvider.OnDungeonBuildStop ( )
virtual

Called after build has ended

Reimplemented from DungeonArchitect.DungeonSceneProvider.

Definition at line 35 of file PooledDungeonSceneProvider.cs.


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