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; }
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); } }
public Delayed <ISprite> GetSprite(int id, Gob owner, byte[] spriteState = null) { return(Get(id, n => App.Resources.GetSprite(n, owner, spriteState))); }
private void Apply(GobDelta.Clear delta) { session.Objects.Remove(args.GobId, args.Frame); gob = null; }
public GobFollowing(Gob gob, Point2D offset, byte szo) { Gob = gob; Offset = offset; Szo = szo; }