示例#1
0
    /// <summary>
    /// Kills the missile and spawn an explosion
    /// </summary>
    public void KillMissile()
    {
        Vector3 pos = transform.position;

        pos.y += ExplosionYOffset;

        // Spawn the explosion (also kills this game object)
        explodable.SpawnExplosion(pos);
    }
示例#2
0
    // Perform death cleanup
    void DoDie()
    {
        if (isDead)
        {
            return;
        }

        isDead = true;
        transform.SetParent(null);
        explodable.SpawnExplosion(transform.position, 0.075f);
    }