private WordAbstractBehaviour AssociateWordBehaviour(WordResult wordResult, WordAbstractBehaviour wordBehaviourTemplate) { if (this.mActiveWordBehaviours.Count >= this.mMaxInstances) { return(null); } Word word = wordResult.Word; wordBehaviourTemplate.InitializeWord(word); this.mActiveWordBehaviours.Add(word.ID, wordBehaviourTemplate); return(wordBehaviourTemplate); }
private void UpdateTrackablesEditor() { TrackableBehaviour[] array = (TrackableBehaviour[])UnityEngine.Object.FindObjectsOfType(typeof(TrackableBehaviour)); for (int i = 0; i < array.Length; i++) { TrackableBehaviour trackableBehaviour = array[i]; if (trackableBehaviour.enabled) { if (trackableBehaviour is WordAbstractBehaviour) { WordAbstractBehaviour wordAbstractBehaviour = (WordAbstractBehaviour)trackableBehaviour; string text = wordAbstractBehaviour.IsSpecificWordMode ? wordAbstractBehaviour.SpecificWord : "AnyWord"; wordAbstractBehaviour.InitializeWord(new WordImpl(0, text, new Vector2(500f, 100f))); } trackableBehaviour.OnTrackerUpdate(TrackableBehaviour.Status.TRACKED); } } }