Exemplo n.º 1
0
    public void SpawnBreeded(DNA mutatedDna, Pingu pingu, float energyForChild)
    {
        Pingu spawnedPingu = InstantSpawn(pingu.gameObject.transform.position).GetComponent <Pingu>();

        spawnedPingu.Init(mutatedDna, GameManager.instance.GetRandomPointInScenario(minDistanceFromCenter), energyForChild);
        Debug.Log($"New Pingu spawned: {spawnedPingu.gameObject.name}", spawnedPingu.gameObject);
    }
Exemplo n.º 2
0
 private void Start()
 {
     for (int f = 0; f < initialPinguQtty; f++)
     {
         Pingu spawnedPingu = InstantSpawn().GetComponent <Pingu>();
         DNA   newDna       = ScriptableObject.CreateInstance <DNA>();
         newDna.SetValues();
         spawnedPingu.Init(newDna, GameManager.instance.GetRandomPointInScenario(minDistanceFromCenter), startEnergy);
     }
 }