Beispiel #1
0
    public int GetBirthCost()
    {
        PrefabLoaderWrapper_script pl = PrefabLoaderWrapper_script.GetPL();
        List <Gene> Genes             = GetGenes();

        int sum = 0;

        foreach (Gene gene in Genes)
        {
            string type = gene.GetCellType().ToString();

            if (type == "None")
            {
                continue;
            }

            GameObject cell = pl.Load(type, "cells");
            if (cell == null)
            {
                continue;
            }
            sum += cell.GetComponent <Cell_script>().GetStartCost();
        }
        return(sum);
    }
    // Use this for initialization
    void Start()
    {
        pl   = PrefabLoaderWrapper_script.GetPL();
        Seed = pl.Load("Seed");

        CreateOrganisms();
    }
Beispiel #3
0
    void Awake()
    {
        pl = PrefabLoaderWrapper_script.GetPL();
        if (customDNA != null)
        {
            DNA = new DNA(DNAU.GeneEntries2GeneList(customDNA));
        }

        OrganismPrefab = pl.Load("Organism");
    }
    public void Awake()
    {
        pl = PrefabLoaderWrapper_script.GetPL();

        FiveSecondLooper.Add(CheckBirth);
    }
Beispiel #5
0
 private void Awake()
 {
     pl = PrefabLoaderWrapper_script.GetPL();
 }