示例#1
0
    public static Organism InstantiateBacteriaCell(Vector2 spawnPosition)
    {
        BacteriaCell bacteriaCellToSpawn = BacteriaCellPool.Instance.Get();

        bacteriaCellToSpawn.ResetOrganismAtPosition(spawnPosition);
        bacteriaCellToSpawn.OnObjectToSpawn();

        return(bacteriaCellToSpawn);
    }
示例#2
0
    private void SpawnTutorialBacteriaCell(Vector2 spawnPos)
    {
        Organism bacteriaCell = BacteriaCell.InstantiateBacteriaCell(spawnPos);

        bacteriaCell.GetComponent <OrganismAttack>().enabled      = false;
        bacteriaCell.GetComponent <OrganismMovement>().enabled    = false;
        bacteriaCell.GetComponent <OrganismDuplication>().enabled = false;
        bacteriaCell.GetComponent <OrganismMutation>().enabled    = false;

        bacteriaCellList.Add(bacteriaCell);
    }
示例#3
0
    private void SpawnBacteriaCell()
    {
        // Spawn some bacteria cells
        for (int i = 0; i < bacteriaCellCount; i++)
        {
            // Get a valid position by using object size as parameter
            Vector3 validPos = GetAValidPos(bacteriaCellSize);

            BacteriaCell.InstantiateBacteriaCell(validPos);
        }
    }
示例#4
0
 public override Organism InstantiateOrganism(Vector2 spawnPosition)
 {
     return(BacteriaCell.InstantiateBacteriaCell(spawnPosition));
 }