void Start() { posMouseAnterior = new Vector3(); deltaPosMouse = new Vector3(); rotador = gameObject.GetComponent <Rotador>(); osc = GameObject.FindWithTag("ManagerOSCUnico").GetComponent <OSC>(); }
void Update() { if (deboReiniciar && restartTime < 0) { GameObject cubo = GameObject.FindWithTag("Modelo"); if (cubo != null) { rotador = cubo.GetComponent <Rotador>(); scalador = cubo.GetComponent <Scalador>(); traslador = cubo.GetComponent <Traslador>(); } deboReiniciar = false; } else if (restartTime >= 0) { restartTime--; } if (rotador != null) { enviarMensajeEscalacion(); enviarMensajeTraslacion(); enviarMensajeRotacion(); } }