//private Stopwatch sw; public Runloop(ISource s, OscConnection c, OscProcessor p) { source = s; source.BufferUpdated += BufferUpdated; connection = c; processor = p; }
public Runloop(ISource s, OscConnection c) { source = s; source.NewInputsReady += SendMessages; source.NoChange += Loop; connection = c; }
//-------------------------------------------------------- // * On OSC Message //-------------------------------------------------------- void Awake() { bool failedSetup = false; // Check the OSC address is valid if (Rug.Osc.OscAddress.IsValidAddressPattern(OscAddress) == false) { Debug.LogError(string.Format("Invalid OSC address \"{0}\".", OscAddress), this); failedSetup = true; } // try and find the connection object oscConnection = FindObjectOfType <OscConnection>(); if (oscConnection == null) { Debug.LogError("Could not find an OSC connection object within the scene hierarchy.", this); failedSetup = true; } if (failedSetup == true) { gameObject.SetActive(false); } oscConnection.OscListener.Attach(OscAddress, OnOscMessage); if (Kyle != null) { tmpNodes = Kyle.GetComponentsInChildren <Transform>(); foreach (Transform item in tmpNodes) { if (item.tag.Equals("KyleBones")) { kyleNodes.Add(item.name, item.gameObject); } } Debug.Log(kyleNodes.Count); } }