Beispiel #1
0
    private bool isEnemyDead(GameObject other)
    {
        CrazyBot bot = other.GetComponent <CrazyBot>();

        if (bot)
        {
            return(bot.isDead);
        }

        return(false);
    }
    private void killObject(GameObject other)
    {
        Patrol patrol = other.GetComponent <Patrol>();

        if (patrol)
        {
            patrol.killSelf();
            return;
        }

        CrazyBot bot = other.GetComponent <CrazyBot>();

        if (bot)
        {
            bot.killSelf();
        }
    }