Dungeon Architect  17.0.0
DungeonArchitect.DungeonSceneProvider Class Reference

A scene provider instantiates game objects into the scene.
Implementations can customize the instantiation process if needed (e.g. object pooling etc) More...

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

Public Member Functions

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

Public Attributes

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

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

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

A scene provider instantiates game objects into the scene.
Implementations can customize the instantiation process if needed (e.g. object pooling etc)

Definition at line 14 of file DungeonSceneProvider.cs.

Member Function Documentation

◆ AddGameObject()

virtual GameObject DungeonArchitect.DungeonSceneProvider.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 in DungeonArchitect.PooledDungeonSceneProvider.

Definition at line 33 of file DungeonSceneProvider.cs.

◆ AddGameObjectFromArray()

virtual GameObject DungeonArchitect.DungeonSceneProvider.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 in DungeonArchitect.PooledDungeonSceneProvider.

Definition at line 42 of file DungeonSceneProvider.cs.

◆ AddSprite()

virtual GameObject DungeonArchitect.DungeonSceneProvider.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 in DungeonArchitect.PooledDungeonSceneProvider.

Definition at line 49 of file DungeonSceneProvider.cs.

◆ OnDungeonBuildStart()

virtual void DungeonArchitect.DungeonSceneProvider.OnDungeonBuildStart ( )
virtual

Called when build is started

Reimplemented in DungeonArchitect.PooledDungeonSceneProvider, and DungeonArchitect.NonPooledDungeonSceneProvider.

Definition at line 18 of file DungeonSceneProvider.cs.

◆ OnDungeonBuildStop()

virtual void DungeonArchitect.DungeonSceneProvider.OnDungeonBuildStop ( )
virtual

Called after build has ended

Reimplemented in DungeonArchitect.PooledDungeonSceneProvider, and DungeonArchitect.NonPooledDungeonSceneProvider.

Definition at line 26 of file DungeonSceneProvider.cs.

Member Data Documentation

◆ config

DungeonConfig DungeonArchitect.DungeonSceneProvider.config
protected

Dungeon config used by the builder

Definition at line 55 of file DungeonSceneProvider.cs.

◆ dungeon

Dungeon DungeonArchitect.DungeonSceneProvider.dungeon
protected

The owning dungeon actor reference

Definition at line 60 of file DungeonSceneProvider.cs.

◆ itemParent

GameObject DungeonArchitect.DungeonSceneProvider.itemParent

The parent for all spawned game objects. Assign this to create all spawned objects underneath it to avoid cluttering up the hierarchy

Definition at line 66 of file DungeonSceneProvider.cs.


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