private Pair <bool, int> TypeId(string type) { var index = mTypeIndex.IndexOf(type); if (index >= 0) { return(Pair <bool, int> .Gen(true, index)); } mTypeIndex.Add(type); index = mTypeIndex.IndexOf(type); //DebugLog.Log.Print("type({0},{1})", type, index); return(Pair <bool, int> .Gen(false, index)); }
private void Update() { if (mNow.Count != 0) { mNow.Sort(ComparisonID); } // 片方が空集合だった場合の処理 if (mNow.Count == 0) { foreach (var e in mPrev) { Invoke(mOut, e.gameObject); } return; } if (mPrev.Count == 0) { foreach (var e in mNow) { Invoke(mIn, e.gameObject); } return; } // 処理用Iteratorの準備 var p = mPrev.GetEnumerator(); var n = mPrev.GetEnumerator(); var pre = Pair <int, List <Collider> .Enumerator> .Gen(p.Current.GetInstanceID(), p); var now = Pair <int, List <Collider> .Enumerator> .Gen(n.Current.GetInstanceID(), n); // IDの若い順に処理 while (pre.Key > 0 || now.Key > 0) { CheckAndEventcall(pre, now); } // 集合更新 mPrev = mNow; mNow = new List <Collider>(); }
public void BlackbordUpdate(Component com, string key, float value) { Blackbord.ValueStore.Add(Pair <string, float> .Gen(key, value)); }