public static Organism InstantiateBacteriaCell(Vector2 spawnPosition) { BacteriaCell bacteriaCellToSpawn = BacteriaCellPool.Instance.Get(); bacteriaCellToSpawn.ResetOrganismAtPosition(spawnPosition); bacteriaCellToSpawn.OnObjectToSpawn(); return(bacteriaCellToSpawn); }
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); }
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); } }
public override Organism InstantiateOrganism(Vector2 spawnPosition) { return(BacteriaCell.InstantiateBacteriaCell(spawnPosition)); }