Ejemplo n.º 1
0
    public Tuple <SpecimenFeatures, SpecimenFeatures> Cross(SpecimenFeatures first, SpecimenFeatures second)
    {
        SpecimenFeatures newFirst  = CrossOnce(first, second);
        SpecimenFeatures newSecond = CrossOnce(second, first);

        return(new Tuple <SpecimenFeatures, SpecimenFeatures>(newFirst, newSecond));
    }
Ejemplo n.º 2
0
    public void NewFeatures(SpecimenFeatures features)
    {
        Material material = thisRenderer.material;

        material.color = features.color;
        material.SetFloat("_Metallic", features.metallic);
        material.SetFloat("_Smoothness", features.smoothness);
    }
Ejemplo n.º 3
0
 public void NewFeatures(SpecimenFeatures features)
 {
     this.features        = features;
     transform.position   = new Vector3(transform.position.x, features.size / 2f, transform.position.z);
     transform.localScale = new Vector3(features.size, features.size, features.size);
     featuresRenderer.NewFeatures(features);
     movement.SetSpeed(features.speed);
 }
Ejemplo n.º 4
0
 public SpecimenFeatures CrossOnce(SpecimenFeatures first, SpecimenFeatures second)
 {
     return(new SpecimenFeatures(
                Cross(first.color, second.color),
                Cross(first.metallic, second.metallic),
                Cross(first.smoothness, second.smoothness),
                Cross(first.speed, second.speed, speedRange),
                Cross(first.size, second.size, sizeRange)
                ));
 }
Ejemplo n.º 5
0
    void Awake()
    {
        thisRenderer = GetComponent <Renderer> ();
        if (tag != "Player")
        {
            return;
        }
        GameObject       controller = GameObject.FindGameObjectWithTag("GameController");
        SpecimenFeatures features   = controller.GetComponent <Genetics> ().playerAtStart;

        NewFeatures(features);
    }