当前位置: 首页>>代码示例>>C#>>正文


C# GlobalState类代码示例

本文整理汇总了C#中GlobalState的典型用法代码示例。如果您正苦于以下问题:C# GlobalState类的具体用法?C# GlobalState怎么用?C# GlobalState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GlobalState类属于命名空间,在下文中一共展示了GlobalState类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: check

 public static int check(GlobalState globalstate)
 {
     if (check (globalstate as Conditions))
         return GlobalStateCondition.GS_SATISFIED;
     else
         return GlobalStateCondition.GS_NOT_SATISFIED;
 }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:7,代码来源:ConditionChecker.cs

示例2:

        public GlobalState this[GlobalState.StateType i]
        {
            get
            {
                return fStates[(int)i];
            }

            set
            {
                fStates[(int)i] = value;
            }
        }
开发者ID:Wiladams,项目名称:NewTOAPIA,代码行数:12,代码来源:GlobalStateManager.cs

示例3: ChangeOperationType

 public void ChangeOperationType(GlobalState state)
 {
     switch (state)
     {
         case GlobalState.DRAG_WHITEBALL:
             SetOpeartion(dragOperation);
             break;
         case GlobalState.IDLE:
             SetOpeartion(pointerOperation);
             break;
         default:
             SetOpeartion(m_DontDoAnyOperation);
             break;
     }
 }
开发者ID:y378076136,项目名称:PoolGame-template,代码行数:15,代码来源:OperateArea.cs

示例4: PropagateAll

 private static uint PropagateAll(GlobalState g)
 {
     uint m = 0;
       while (g.gray != null) m += (uint)PropagateMark(g);
       return m;
 }
开发者ID:NLua,项目名称:KopiLua,代码行数:6,代码来源:lgc.cs

示例5: MarkTMU

 private static void MarkTMU(GlobalState g)
 {
     GCObject u = g.tmudata;
       if (u != null) {
     do {
       u = u.gch.next;
       MakeWhite(g, u);  /* may be marked, if left from previous GC */
       ReallyMarkObject(g, u);
     } while (u != g.tmudata);
       }
 }
开发者ID:NLua,项目名称:KopiLua,代码行数:11,代码来源:lgc.cs

示例6: RootGCRef

 public RootGCRef(GlobalState g)
 {
     this.g = g;
 }
开发者ID:WondermSwift,项目名称:KopiLua,代码行数:4,代码来源:lstate.cs

示例7: CheckLiveness

 internal static void CheckLiveness(GlobalState g, TValue obj)
 {
     LuaAssert(!IsCollectable(obj) ||
     ((TType(obj) == obj.value.gc.gch.tt) && !IsDead(g, obj.value.gc)));
 }
开发者ID:prabirshrestha,项目名称:KopiLua,代码行数:5,代码来源:lobject.cs

示例8: TraverseTable

 private static int TraverseTable(GlobalState g, Table h)
 {
     int i;
       int weakkey = 0;
       int weakvalue = 0;
       /*const*/ TValue mode;
       if (h.metatable != null)
     MarkObject(g, h.metatable);
       mode = gfasttm(g, h.metatable, TMS.TM_MODE);
       if ((mode != null) && TTIsString(mode)) {  /* is there a weak mode? */
       weakkey = (strchr(SValue(mode), 'k') != null) ? 1 : 0 ;
       weakvalue = (strchr(SValue(mode), 'v') != null) ? 1 : 0;
     if ((weakkey!=0) || (weakvalue!=0)) {  /* is really weak? */
       h.marked &= (byte)~(KEYWEAK | VALUEWEAK);  /* clear bits */
       h.marked |= CastByte((weakkey << KEYWEAKBIT) |
                              (weakvalue << VALUEWEAKBIT));
       h.gclist = g.weak;  /* must be cleared after GC, ... */
       g.weak = obj2gco(h);  /* ... so put in the appropriate list */
     }
       }
       if ((weakkey!=0) && (weakvalue!=0)) return 1;
       if (weakvalue==0) {
     i = h.sizearray;
     while ((i--) != 0)
       MarkValue(g, h.array[i]);
       }
       i = SizeNode(h);
       while ((i--) != 0) {
     Node n = gnode(h, i);
     LuaAssert(TType(gkey(n)) != LUATDEADKEY || TTIsNil(gval(n)));
     if (TTIsNil(gval(n)))
       RemoveEntry(n);  /* remove empty entries */
     else {
       LuaAssert(!TTIsNil(gkey(n)));
       if (weakkey==0) MarkValue(g, gkey(n));
       if (weakvalue==0) MarkValue(g, gval(n));
     }
       }
       return ((weakkey != 0) || (weakvalue != 0)) ? 1 : 0;
 }
开发者ID:NLua,项目名称:KopiLua,代码行数:40,代码来源:lgc.cs

示例9: TraverseProto

 /*
 ** All marks are conditional because a GC may happen while the
 ** prototype is still being created
 */
 private static void TraverseProto(GlobalState g, Proto f)
 {
     int i;
       if (f.source != null) StringMark(f.source);
       for (i=0; i<f.sizek; i++)  /* mark literals */
     MarkValue(g, f.k[i]);
       for (i=0; i<f.sizeupvalues; i++) {  /* mark upvalue names */
     if (f.upvalues[i] != null)
       StringMark(f.upvalues[i]);
       }
       for (i=0; i<f.sizep; i++) {  /* mark nested protos */
     if (f.p[i] != null)
       MarkObject(g, f.p[i]);
       }
       for (i=0; i<f.sizelocvars; i++) {  /* mark local-variable names */
     if (f.locvars[i].varname != null)
       StringMark(f.locvars[i].varname);
       }
 }
开发者ID:NLua,项目名称:KopiLua,代码行数:23,代码来源:lgc.cs

示例10: RemarkUpVals

 private static void RemarkUpVals(GlobalState g)
 {
     UpVal uv;
       for (uv = g.uvhead.u.l.next; uv != g.uvhead; uv = uv.u.l.next) {
     LuaAssert(uv.u.l.next.u.l.prev == uv && uv.u.l.prev.u.l.next == uv);
     if (IsGray(obj2gco(uv)))
       MarkValue(g, uv.v);
       }
 }
开发者ID:NLua,项目名称:KopiLua,代码行数:9,代码来源:lgc.cs

示例11: MakeWhite

 public static void MakeWhite(GlobalState g, GCObject x)
 {
     x.gch.marked = (byte)(x.gch.marked & maskmarks | LuaCWhite(g));
 }
开发者ID:NLua,项目名称:KopiLua,代码行数:4,代码来源:lgc.cs

示例12: LuaCWhite

 public static byte LuaCWhite(GlobalState g)
 {
     return (byte)(g.currentwhite & WHITEBITS);
 }
开发者ID:NLua,项目名称:KopiLua,代码行数:4,代码来源:lgc.cs

示例13: IsDead

 public static bool IsDead(GlobalState g, GCObject v)
 {
     return (v.gch.marked & OtherWhite(g) & WHITEBITS) != 0;
 }
开发者ID:NLua,项目名称:KopiLua,代码行数:4,代码来源:lgc.cs

示例14: gfasttm

 public static TValue gfasttm(GlobalState g, Table et, TMS e)
 {
     return (et == null) ? null :
     ((et.flags & (1 << (int)e)) != 0) ? null :
     luaT_gettm(et, e, g.tmname[(int)e]);
 }
开发者ID:chenzuo,项目名称:SharpLua,代码行数:6,代码来源:ltm.cs

示例15: addGlobalState

 /**
  * Adds a global state to the list of global states in the game
  *
  * @param globalState
  *            the global state to add
  */
 public void addGlobalState(GlobalState globalState)
 {
     globalStates.Add(globalState);
 }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:10,代码来源:Chapter.cs


注:本文中的GlobalState类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。