// Use this for initialization void Start() { if (!started) { started = true; print(">>> Start"); GameObject[] itemList = GameObject.FindGameObjectsWithTag("ejeServo"); foreach (GameObject item in itemList) { print("Registro Eje en Dictionary: " + item.name); nombreEjeToGameObject.Add(item.name, item); } parseKeys(); print(">>> CONFIG"); foreach (KeyValuePair <KeyCode, SortedDictionary <string, string> > entry in teclaToProperties) { print("KEYCODE " + entry.Key); printDictionary(entry.Value); } print("<<< CONFIG"); print("<<< Start"); } sInstance = this; }
private void rotarServo(string param) { char[] SEPARADOR_PARAM = { ',' }; string[] partesParametro = param.Split(SEPARADOR_PARAM); if (partesParametro.Length >= 2) { int n_servo = int.Parse(partesParametro [0]); int valor = int.Parse(partesParametro [1]); BrazoController brazo = BrazoController.getInstance(); if (brazo) { brazo.moverById(n_servo, valor); } } }