Esempio n. 1
0
        public VMGameObject(GameObject def, ObjectComponent worldUI) : base(def)
        {
            this.WorldUI = worldUI;
            var state = VM.GlobTS1?(VMAbstractEntityState) new VMTS1ObjectState():new VMTSOObjectState();

            PlatformState = state;
            ObjectState   = (VMIObjectState)state;
        }
Esempio n. 2
0
 public void Load(VMGameObjectMarshal input)
 {
     base.Load(input);
     ObjectState = (VMIObjectState)PlatformState;
     Position    = Position;
     Direction   = input.Direction;
     Disabled    = input.Disabled;
     if (UseWorld)
     {
         ((ObjectComponent)this.WorldUI).DynamicSpriteFlags = this.DynamicSpriteFlags;
         WorldUI.ObjectID = ObjectID;
         if (Slots != null && Slots.Slots.ContainsKey(0))
         {
             ((ObjectComponent)WorldUI).ContainerSlots = Slots.Slots[0];
         }
         SetValue(VMStackObjectVariable.Flags, GetValue(VMStackObjectVariable.Flags));
         RefreshGraphic();
     }
 }