Quantum Engineering
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CombinedMeshManager Class Reference

Public Member Functions

 CombinedMeshManager (GameManager gameManager)
 
void SeparateBlocks (Vector3 target, string type, bool building)
 Separates combined meshes into blocks. More...
 
void CombineBlocks ()
 Starts the coroutine to combine all blocks into combined meshes. More...
 
void SetMaterial (GameObject obj, string blockType)
 Sets up the material for mod block meshes. More...
 
IEnumerator BlockCombineCoroutine ()
 Creates combined meshes from placed building blocks. More...
 
void CombineMeshes ()
 Starts the combined mesh coroutine. More...
 

Private Member Functions

void SpawnDummy (GameObject realObject, GameObject toSpawn, string name)
 Spawns a combined mesh identical to the one being rebuilt, so it is not invisible during the process. More...
 
IEnumerator BlockSeparationCoroutine (Vector3 target, string type)
 Separates combined meshes into blocks. More...
 
bool CombinedMeshRequired ()
 Returns true if any combined mesh needs to be created or rebuilt. More...
 
void CreateCombinedMesh (GameObject holder)
 Creats a combined mesh from all meshes attached to the given object. More...
 
IEnumerator CombineMeshCoroutine ()
 Creates combined meshes from blocks placed in the world. More...
 

Private Attributes

GameManager gameManager
 
bool ironMeshRequired
 
bool steelMeshRequired
 
bool glassMeshRequired
 
bool brickMeshRequired
 
bool modMeshRequired
 

Constructor & Destructor Documentation

◆ CombinedMeshManager()

CombinedMeshManager.CombinedMeshManager ( GameManager  gameManager)
inline

The Combined Mesh Manager handles all combined meshes for building blocks. All standard building blocks are stored in combined meshes after being placed. Parts of the combined mesh are converted to individual blocks when edited by the player. Meteor strikes and weapons also cause small sections of the combined mesh to separate. The combined mesh is refactored after changes occur.

Member Function Documentation

◆ BlockCombineCoroutine()

IEnumerator CombinedMeshManager.BlockCombineCoroutine ( )
inline

Creates combined meshes from placed building blocks.

◆ BlockSeparationCoroutine()

IEnumerator CombinedMeshManager.BlockSeparationCoroutine ( Vector3  target,
string  type 
)
inlineprivate

Separates combined meshes into blocks.

◆ CombineBlocks()

void CombinedMeshManager.CombineBlocks ( )
inline

Starts the coroutine to combine all blocks into combined meshes.

◆ CombinedMeshRequired()

bool CombinedMeshManager.CombinedMeshRequired ( )
inlineprivate

Returns true if any combined mesh needs to be created or rebuilt.

◆ CombineMeshCoroutine()

IEnumerator CombinedMeshManager.CombineMeshCoroutine ( )
inlineprivate

Creates combined meshes from blocks placed in the world.

◆ CombineMeshes()

void CombinedMeshManager.CombineMeshes ( )
inline

Starts the combined mesh coroutine.

◆ CreateCombinedMesh()

void CombinedMeshManager.CreateCombinedMesh ( GameObject  holder)
inlineprivate

Creats a combined mesh from all meshes attached to the given object.

◆ SeparateBlocks()

void CombinedMeshManager.SeparateBlocks ( Vector3  target,
string  type,
bool  building 
)
inline

Separates combined meshes into blocks.

◆ SetMaterial()

void CombinedMeshManager.SetMaterial ( GameObject  obj,
string  blockType 
)
inline

Sets up the material for mod block meshes.

◆ SpawnDummy()

void CombinedMeshManager.SpawnDummy ( GameObject  realObject,
GameObject  toSpawn,
string  name 
)
inlineprivate

Spawns a combined mesh identical to the one being rebuilt, so it is not invisible during the process.

Member Data Documentation

◆ brickMeshRequired

bool CombinedMeshManager.brickMeshRequired
private

◆ gameManager

GameManager CombinedMeshManager.gameManager
private

◆ glassMeshRequired

bool CombinedMeshManager.glassMeshRequired
private

◆ ironMeshRequired

bool CombinedMeshManager.ironMeshRequired
private

◆ modMeshRequired

bool CombinedMeshManager.modMeshRequired
private

◆ steelMeshRequired

bool CombinedMeshManager.steelMeshRequired
private

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