Exemple #1
0
    bool HandleDigdogger()
    {
        if (!WorldInfo.Instance.IsInDungeon)
        {
            return(false);
        }
        DungeonRoom room = PlayerC.GetOccupiedDungeonRoom();

        if (room == null)
        {
            return(false);
        }

        EnemyAI_Digdogger digdogger = null;

        foreach (var enemy in room.Enemies)
        {
            digdogger = enemy.GetComponent <EnemyAI_Digdogger>();
            if (digdogger != null)
            {
                break;
            }
        }
        if (digdogger == null || digdogger.HasSplit)
        {
            return(false);
        }

        digdogger.SplitIntoBabies();

        return(true);
    }
    void OnEnemySpawned(Enemy enemy)
    {
        EnemyAI_Digdogger digdogger = enemy.GetComponent <EnemyAI_Digdogger>();

        digdogger.numBabies = numBabies;
    }