public int CalculateOffsetY(INPC npc) { var multiplier = npc.IsFacing(EODirection.Left, EODirection.Up) ? -1 : 1; var walkAdjust = npc.IsActing(NPCActionState.Walking) ? WalkHeightFactor * npc.GetWalkFrame() : 0; //walkAdjust * multiplier is the old ViewAdjustY return(npc.X * HeightFactor + npc.Y * HeightFactor + walkAdjust * multiplier); }
public int CalculateOffsetX(INPC npc) { var multiplier = npc.IsFacing(EODirection.Left, EODirection.Down) ? -1 : 1; var walkAdjust = npc.IsActing(NPCActionState.Walking) ? WalkWidthFactor * npc.GetWalkFrame() : 0; //walkAdjust * multiplier is the old ViewAdjustX return(npc.X * WidthFactor - npc.Y * WidthFactor + walkAdjust * multiplier); }