Ejemplo n.º 1
0
 private void OnTriggerEnter(Collider other)
 {
     cg.alpha    = 1f;
     hasWarble   = true;
     WarbleGenes = other.gameObject.GetComponent <OldGenes>();
     ui.ShowGenes(WarbleGenes.genes);
     SpawnController.WarbleEnterExit();
 }
Ejemplo n.º 2
0
    public void SpawnWarble()
    {
        OldGenes newWarble = GameObject.Instantiate <GameObject>(WarblePrefab).GetComponent <OldGenes>();

        newWarble.transform.position = transform.position;
        newWarble.transform.SetParent(WarbleMaker.transform);
        newWarble.Mate(Left.WarbleGenes.genes, Right.WarbleGenes.genes);
    }
Ejemplo n.º 3
0
    private List <Transform> encounters;  // The predators, food or warbles encountered on the track

    private void Awake()
    {
        behaviorGenes = GetComponent <OldGenes>();
        radar         = GetComponent <BoxCollider>();
        encounters    = new List <Transform>(8);
    }