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)); }
public void NewFeatures(SpecimenFeatures features) { Material material = thisRenderer.material; material.color = features.color; material.SetFloat("_Metallic", features.metallic); material.SetFloat("_Smoothness", features.smoothness); }
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); }
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) )); }
void Awake() { thisRenderer = GetComponent <Renderer> (); if (tag != "Player") { return; } GameObject controller = GameObject.FindGameObjectWithTag("GameController"); SpecimenFeatures features = controller.GetComponent <Genetics> ().playerAtStart; NewFeatures(features); }