コード例 #1
0
    public void SpawnVoxels()
    {
        voxelization.CalculateVoxelsGrid();
        voxelization.SpawnVoxels();

        EnemyExplosionController explosion = rsc.poolMng.enemyExplosionPool.GetObject();

        if (explosion != null)
        {
            explosion.transform.position = transform.position;
            explosion.PlayAll(dieExplosionSoundFx);
        }
    }
コード例 #2
0
 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();
     }
 }