public InstanceDescriptor clone(ObjectManager objectManager) { InstanceDescriptor inst = new InstanceDescriptor(TypeDescriptorInFileManager, objectManager); string name = inst.Name; inst.X = X; inst.Y = Y; inst.Light = new Light(Light); inst.Sprite = new Sprite(Sprite.getRenderer(), Sprite.getResources(), Sprite); inst.IsDebug = IsDebug; inst.Shadows = Shadows; inst.HudObject = HudObject; for (int i = 0; i < getPropertySet().Count; i++) { inst.propDescs[i] = lookUpPropertyDescriptor(propDescs[i].Name).clone(); } foreach (string scriptName in getScriptNames()) { inst.addScript(scriptName); inst.setScriptActive(scriptName, getScriptActive(scriptName)); } inst.Name = name; inst.Layer = Layer; return(inst); }
public InstanceDescriptor createNull() { if (nullObjMan == null) { nullObjMan = new Whiskey2D.Core.Managers.Impl.DefaultObjectManager(); nullObjMan.init(); } if (nullTable.ContainsKey(ClassName)) { return(nullTable[ClassName]); } InstanceDescriptor nullInst = new InstanceDescriptor(this, nullObjMan); nullInst.Name = "empty (" + ClassName + ")"; nullObjMan.updateAll(); nullTable.Add(ClassName, nullInst); return(nullInst); }
//private Insta public InstanceType(TypeDescriptor descr, InstanceDescriptor instance) { this.instance = instance; this.descr = descr; }