public void SpawnVoxels() { voxelization.CalculateVoxelsGrid(); voxelization.SpawnVoxels(); EnemyExplosionController explosion = rsc.poolMng.enemyExplosionPool.GetObject(); if (explosion != null) { explosion.transform.position = transform.position; explosion.PlayAll(dieExplosionSoundFx); } }
public void SpawnVoxels() { if (blackboard.lastShotSameColor) { voxelization.SetMaterial(color); voxelization.SpawnFakeVoxels(); } else { voxelization.SetGreyMaterial(); //Wrong color does not explode so, grid has to be more precise voxelization.CalculateVoxelsGrid(); voxelization.SpawnColliderThisTime = false; voxelization.SpawnVoxels(); } }