Example #1
0
        //private int zM;

        public ObjectInstance(ObjectInfo baseInfo, Layer layer, Board board, int x, int y, int z, MapleBool r, MapleBool hide, MapleBool reactor, MapleBool flow, int? rx, int? ry, int? cx, int? cy, string name, string tags, List<ObjectInstanceQuest> questInfo, bool flip, bool beforeAdding)
            : base(board, layer, x, y, z, beforeAdding)
        {
            this.baseInfo = baseInfo;
            this.flip = flip;
            this._r = r;
            this.name = name;
            this._hide = hide;
            this._reactor = reactor;
            this._flow = flow;
            this._rx = rx;
            this._ry = ry;
            this._cx = cx;
            this._cy = cy;
            this._tags = tags;
            this.questInfo = questInfo;
            //this.zM = zM;
            if (flip)
                X -= Width - 2 * Origin.X;
        }
Example #2
0
 public static void Reload(ObjectInfo objToReload)
 {
     objToReload = Load((WzSubProperty)objToReload.ParentObject, objToReload.oS,objToReload.l0,objToReload.l1,objToReload.l2);
 }
Example #3
0
 public static ObjectInfo Load(WzSubProperty parentObject, string oS, string l0, string l1, string l2)
 {
     WzCanvasProperty frame1 = (WzCanvasProperty)WzInfoTools.GetRealProperty(parentObject["0"]);
     ObjectInfo result = new ObjectInfo(frame1.PngProperty.GetPNG(false), WzInfoTools.VectorToSystemPoint((WzVectorProperty)frame1["origin"]),oS,l0,l1,l2, parentObject);
     WzSubProperty chairs = (WzSubProperty)parentObject["seat"];
     IWzImageProperty footholds = (IWzImageProperty)frame1["foothold"];
     if (footholds != null)
     {
         if (footholds is WzConvexProperty)
         {
             result.fullFootholdInfo = false;
             result.footholdOffsets = new List<XNA.Point>();
             foreach (WzVectorProperty fhAnchor in footholds.WzProperties)
                 result.footholdOffsets.Add(WzInfoTools.VectorToXNAPoint(fhAnchor));
         }
         else
         {
             result.fullFootholdInfo = true;
             result.footholdFullOffsets = new List<List<XNA.Point>>();
             List<XNA.Point> fhAnchorList = new List<XNA.Point>();
             foreach (WzConvexProperty fh in footholds.WzProperties)
             {
                 foreach (WzVectorProperty fhAnchor in fh.WzProperties)
                     fhAnchorList.Add(WzInfoTools.VectorToXNAPoint(fhAnchor));
                 result.footholdFullOffsets.Add(fhAnchorList);
                 fhAnchorList = new List<XNA.Point>();
             }
         }
     }
     //IWzImageProperty ropes = (IWzImageProperty)frame1["ladder"];
     if (chairs != null)
     {
         result.chairOffsets = new List<XNA.Point>();
         foreach (WzVectorProperty chair in chairs.WzProperties)
             result.chairOffsets.Add(WzInfoTools.VectorToXNAPoint(chair));
     }
     /*if (footholds != null)
         foreach (WzVectorProperty foothold in footholds.WzProperties)
             result.footholdOffsets.Add(WzInfoTools.VectorToXNAPoint(foothold));*/
     /*if (ropes != null && ropes.WzProperties.Count > 0)
         if (ropes.WzProperties[0] is WzVectorProperty)
             foreach (WzVectorProperty rope in ropes.WzProperties)
                 result.ropeOffsets.Add(WzInfoTools.VectorToXNAPoint(rope));
         else if (ropes.WzProperties[0] is WzConvexProperty)
             foreach (WzConvexProperty convex in ropes.WzProperties)
                 foreach (WzVectorProperty rope in convex.WzProperties)
                     result.ropeOffsets.Add(WzInfoTools.VectorToXNAPoint(rope));
         else throw new Exception("wrong rope anchor type at ObjectInfo Load");*/
     return result;
 }
Example #4
0
 public ShipObject(ObjectInfo baseInfo, Board board, int x, int y, int z, int x0, int tMove, int shipKind, bool flip, bool beforeAdding)
     : base(board, x, y, z, beforeAdding)
 {
     this.baseInfo = baseInfo;
     this.flip = flip;
     this.x0 = x0;
     this.tMove = tMove;
     this.shipKind = shipKind;
     if (flip)
         X -= Width - 2 * Origin.X;
 }