IEnumerator Start() { yield return new WaitForSeconds (.1f); CurrentDiceImage = (DiceImageType) (MarkerID % 6); InteractionLayerIndex = LayerMask.NameToLayer (InteractionLayer.ToString()); mTrackableBehaviour = GetComponent<TrackableBehaviour>(); if (mTrackableBehaviour) { mTrackableBehaviour.RegisterTrackableEventHandler(this); } }
static bool CompareOnType(Dictionary<DiceImageType,int> a, Dictionary<DiceImageType,int> b, DiceImageType type ){ int a_count = 0; int b_count = 0; if (a.ContainsKey (type)) { a_count = a[type]; } if (b.ContainsKey (type)) { b_count = b[type]; } if(a_count == b_count){ return true; } return false; }