void UpdateView(SystemComponentView component) { var info = ((SystemDiagnoseableTrees)(component.GetTree())).GetInfo(component); GetComponent <Renderer>().material.color = Color.Lerp(Color.red, Color.green, info.lastEnergy); text.text = info.lastEnergy.ToString(); }
void EnterListener(SystemComponentView view) { var info = ((SystemDiagnoseableTrees)view.GetTree()).GetInfo(view); energyIndicator.SetValue(info.lastEnergy); }