DespawnWarning() public method

public DespawnWarning ( ImpactWarning, warning ) : void
warning ImpactWarning,
return void
Ejemplo n.º 1
0
    void OnTriggerEnter(Collider other)
    // We hit something
    {
        Player player = other.transform.root.GetComponentInChildren <Player> ();

        if (player != null)
        // Hit the player if we just struck him
        {
            player.OnMeteoriteStrike();
        }

        foreach (GameObject prefab in hitEffectPrefabs)
        // Spawn all the hit effects
        {
            Instantiate(prefab, transform.position, Quaternion.identity);
        }

        // Despawn //

        demoControl.DespawnWarning(warningInstance);
        demoControl.DespawnMeteorite(this);
    }