public void Init(ObjetoBase objeto, CustomAnchor main) { base.Init(main); em = (ExploracionMetodo)Manager.Instance.GetMenu("ExploracionMetodo"); eo = (ExploracionObjeto)Manager.Instance.GetMenu("ExploracionObjeto"); this.objeto = objeto; Interaction.OnGraspEnd += (() => Release()); textoPanelSuperior.text = cabecera; }
// Start is called before the first frame update public override void Init() { base.Init(); c = (Consola)Manager.Instance.GetMenu("Consola"); e = (ExploracionObjeto)Manager.Instance.GetMenu("ExploracionObjeto"); GetButton("Ejecutar").OnPress += (() => Execute()); foreach (SubmenuMetodo s in menus) { s.gameObject.SetActive(false); s.Init(); } }
public new void Init(CustomAnchor main) { base.Init(main); eo = (ExploracionObjeto)Manager.Instance.GetMenu("ExploracionObjeto"); mg = (MenuGrid)Manager.Instance.GetMenu("MenuGrid"); Interaction.OnGraspEnd += (() => Release()); material = cuerpo.material; IntVariable[] intVariables = GetComponentsInChildren <IntVariable>(); int indexVar = 0; int indexMet = 0; foreach (IntVariable k in variablesInt) { anchorsVariables[indexVar].gameObject.SetActive(true); k.Init(this, anchorsVariables[indexVar]); k.transform.position = anchorsVariables[indexVar].transform.position; indexVar++; } foreach (FloatVariable k in variablesFloat) { anchorsVariables[indexVar].gameObject.SetActive(true); k.Init(this, anchorsVariables[indexVar]); k.transform.position = anchorsVariables[indexVar].transform.position; indexVar++; } foreach (BoolVariable k in variablesBool) { anchorsVariables[indexVar].gameObject.SetActive(true); k.Init(this, anchorsVariables[indexVar]); k.transform.position = anchorsVariables[indexVar].transform.position; indexVar++; } foreach (MetodoBase k in metodos) { anchorsMetodo[indexMet].gameObject.SetActive(true); k.Init(this, anchorsMetodo[indexMet]); k.transform.position = anchorsMetodo[indexMet].transform.position; indexMet++; } textoPanelSuperior.text = "new " + "<#" + ColorUtility.ToHtmlStringRGB(material.color) + ">" + nombre + "</color><#000000FF>();</color>"; base.Init(main); }
public void Init(string nombre, string clase, CustomAnchor main, Material colorVariable, Material colorClase) { base.Init(main); eo = (ExploracionObjeto)Manager.Instance.GetMenu("ExploracionObjeto"); mg = (MenuGrid)Manager.Instance.GetMenu("MenuGrid"); c = (Consola)Manager.Instance.GetMenu("Consola"); this.nombre = nombre; this.clase = clase; this.colorVariable = colorVariable; this.colorClase = colorClase; this.nombreColor = "<#" + ColorUtility.ToHtmlStringRGB(colorVariable.color) + ">" + nombre + "</color>"; this.nombreColorClase = "<#" + ColorUtility.ToHtmlStringRGB(colorClase.color) + ">" + clase + "</color>"; objetoReferenciado = null; Interaction.OnGraspEnd += (() => Release()); textoPanelSuperior.text = nombreColorClase + " " + nombreColor + ";"; }