Example #1
0
    public override IEnumerable <ISpawned> Spawn(Node worldNode, Vector3 location)
    {
        // The true here is that this is AI controlled
        var first = SpawnHelpers.SpawnMicrobe(species, location, worldNode, microbeScene, true, cloudSystem,
                                              currentGame);

        yield return(first);

        if (first.Species.IsBacteria)
        {
            foreach (var colonyMember in SpawnHelpers.SpawnBacteriaColony(species, location, worldNode, microbeScene,
                                                                          cloudSystem, currentGame, random))
            {
                yield return(colonyMember);
            }
        }
    }
Example #2
0
    public override List <ISpawned> Spawn(Node worldNode, Vector3 location)
    {
        var entities = new List <ISpawned>();

        // The true here is that this is AI controlled
        var microbe = SpawnHelpers.SpawnMicrobe(species, location, worldNode, microbeScene,
                                                true, cloudSystem, currentGame);

        if (microbe.Species.IsBacteria)
        {
            SpawnHelpers.SpawnBacteriaColony(species, location, worldNode, microbeScene,
                                             cloudSystem, currentGame, random, entities);
        }

        entities.Add(microbe);
        return(entities);
    }