示例#1
0
    void Explode()
    {
        persistentSFX.PlayContainer1SmashSFX();
        Debug.Log("Bomb exploded");
        Destroy(gameObject);

        Vector3    deathPos = this.gameObject.transform.position;
        Quaternion deathRot = this.gameObject.transform.rotation;

        GameObject explosionCloudPrefab = Instantiate(entityDestroyedPrefab, deathPos, deathRot);
    }
示例#2
0
    public void ContainerDestroyed()
    {
        persistentSFX.PlayContainer1SmashSFX();
        Debug.Log("Container Destroyed");
        Destroy(gameObject);

        // theatreManager.PainSFX(); --- need to implement sounds later - look to how i did theatremanager in Organ of Eden

        Vector3    deathPos = this.gameObject.transform.position;
        Quaternion deathRot = this.gameObject.transform.rotation;

        GameObject container1ShatteredPrefab = Instantiate(entityDestroyedPrefab, deathPos, deathRot);

        for (int i = 0; i < numberOfPickupsToDrop; i++)
        {
            GameObject prefabToSpawn = Instantiate(pickupPrefab, deathPos, deathRot);
        }
    }