Example #1
0
 public ObjectPart(Point2D position, SpritePart sprite, Gob gob, ISpriteEffect effect, int szo)
 {
     X      = position.X;
     Y      = position.Y;
     Sprite = sprite;
     Gob    = gob;
     Effect = effect;
     Z      = sprite.Z;
     SubZ   = sprite.SubZ + szo;
 }
Example #2
0
        public void ApplyChanges(UpdateGameObject args)
        {
            this.args = args;
            this.gob  = null;

            var objectCache = session.Objects;

            if (args.ReplaceFlag)
            {
                objectCache.Remove(args.GobId, args.Frame - 1);
            }

            foreach (var delta in args.Deltas)
            {
                if (this.gob == null)
                {
                    this.gob = objectCache.Get(args.GobId, args.Frame);
                }
                deltaMatcher.Match(delta);
            }
        }
Example #3
0
 public Delayed <ISprite> GetSprite(int id, Gob owner, byte[] spriteState = null)
 {
     return(Get(id, n => App.Resources.GetSprite(n, owner, spriteState)));
 }
Example #4
0
 private void Apply(GobDelta.Clear delta)
 {
     session.Objects.Remove(args.GobId, args.Frame);
     gob = null;
 }
Example #5
0
 public GobFollowing(Gob gob, Point2D offset, byte szo)
 {
     Gob    = gob;
     Offset = offset;
     Szo    = szo;
 }