Example #1
0
    private void GenerateFruit()
    {
        GameObject g = Instantiate(MotherNature.Creatures["Fruit"], GetComponent <Idlespace>().PickPoint(), Quaternion.identity);

        g.SetActive(true);
        g.GetComponent <VectorCreature>().agent = SymAgent.Create("Fruit", g.GetComponent <VectorCreature>(), Random.Range(0, 2.0f));
    }
Example #2
0
 public void Populate(int pula, bool spawninfant = false)
 {
     for (int i = 0; i < pula; i++)
     {
         GameObject g = Instantiate(MotherNature.Creatures[creature], /*transform.position + Random.insideUnitSphere * 2*/ GetComponent <Idlespace>().PickPoint(), Quaternion.identity);
         g.SetActive(true);
         g.GetComponent <VectorCreature>().agent = SymAgent.Create(creature, g.GetComponent <VectorCreature>(), UnityEngine.Random.Range(0, 2.0f));
         if (!spawninfant)
         {
             g.GetComponent <VectorCreature>().RandomAge(i / (float)pula);
         }
         //  g.GetComponent<Fish>().IdleInSpace(GetComponent<Idlespace>());
     }
 }