예제 #1
0
        public long newId(IHasStateObject obj)
        {
            var num = count++;

            table.set(num, obj);
            return(num);
        }
예제 #2
0
 public long insertObject(IHasStateObject obj, long id)
 {
     if (table.get(id) != null)
     {
         Debug.LogError("insertObject is attempting to overwrit object in id table, id = " + id);
     }
     table.set(id, obj);
     return(id);
 }
예제 #3
0
        public void set(long id, IHasStateObject obj)
        {
            IHasStateObject test = null;

            if (objects.TryGetValue(id, out test))
            {
                Log.errorLog(this, "setting id when id already exists", id, obj, test);
            }
            objects[id] = obj;
        }
예제 #4
0
        public object get(long id)
        {
            IHasStateObject test = null;

            if (!objects.TryGetValue(id, out test))
            {
                // Log.warnLog(this,"requested id returned null",id);
            }
            return(test);
        }