public static StackCacheObject createFrom(StackLinkObjectCache cache, rtObjectBase src) { LinkSystemObject lobj = (LinkSystemObject)src.value; StackCacheObject clone = new StackCacheObject(cache, (lobj).Clone(), null ); RunTimeScope scope = new RunTimeScope(null, src.objScope.blockId, null, clone, RunTimeScopeType.objectinstance); clone.objScope = scope; return(clone); }
public StackLinkObjectCache Clone() { StackLinkObjectCache c = new StackLinkObjectCache(); c.player = player; if (cache != null) { c.cache = new StackCacheObject[cache.Length]; c.structuseswitchs = new bool[structuseswitchs.Length]; c.strunctuseindexs = new int[strunctuseindexs.Length]; c.strunctusecount = 0; for (int i = 0; i < cache.Length; i++) { //c.cache[i] = (rtObject)cache[i].Clone(); if (cache[i] != null) { c.cache[i] = StackCacheObject.createFrom(c, cache[i]); } } } return(c); }
public StackCacheObject(StackLinkObjectCache cache, ASBinCode.rtti.Object v, RunTimeScope s) : base(v, s) { this.cache = cache; }