예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
 //private Insta
 public InstanceType(TypeDescriptor descr, InstanceDescriptor instance)
 {
     this.instance = instance;
     this.descr    = descr;
 }