示例#1
0
 public FieldObject(FieldObjectEntity objectField, WorldAnchor anchor)
     : base(objectField.collisionWidth, objectField.collisionHeight, anchor)
 {
     this.objectField = objectField;
     this.overlapEvent = objectField.overlapEventType;
     vectorControl = new VectorControl(this);
 }
示例#2
0
 public FieldInstance(E_OverlapEvent overlapEvent, ObjectField objectField, WorldAnchor anchor)
     : base(objectField.CollisionWidth, objectField.CollisionHeigth, anchor)
 {
     this.objectField = objectField;
     this.overlapEvent = overlapEvent;
     vectorControl = new VectorControl(this);
 }
示例#3
0
文件: LayerRect.cs 项目: pb0/ID0_Test
    public LayerRect(LayerPoint point, float width, float height, WorldAnchor anchor)
    {
        this.point = point;
        this.width = width;
        this.height = height;
        this.anchor = anchor;

        CalcCornerPoints(out TopLeft, out BottomRight);
        Rect = RectTool.Create(TopLeft.InLayerPoint, BottomRight.InLayerPoint);
    }
示例#4
0
文件: TileLayer.cs 项目: pb0/ID0_Test
    public Tile(LayerInfo layerInfo, WorldAnchor anchor)
        : base(layerInfo.width, layerInfo.height, anchor)
    {
        if (layerInfo == null)
        {
            Debug.LogError("must not be null");
        }

        this.tileInfo = layerInfo;
    }
示例#5
0
 public static Rect Apply(Rect rect, WorldAnchor anchor)
 {
     if (anchor == WorldAnchor.TopLeft || anchor == WorldAnchor.MiddleLeft || anchor == WorldAnchor.BottomLeft)
     {
         rect.x += rect.width / 2;
     }
     else if (anchor == WorldAnchor.TopRight || anchor == WorldAnchor.MiddleRight || anchor == WorldAnchor.BottomRight)
     {
         rect.x -= rect.width / 2;
     }
     if (anchor == WorldAnchor.TopLeft || anchor == WorldAnchor.TopCenter || anchor == WorldAnchor.TopRight)
     {
         rect.y -= rect.height / 2;
     }
     else if (anchor == WorldAnchor.BottomLeft || anchor == WorldAnchor.BottomCenter || anchor == WorldAnchor.BottomRight)
     {
         rect.y += rect.height / 2;
     }
     return rect;
 }
示例#6
0
 public FieldObject(OverlapEventType overlapEvent, float width, float height, WorldAnchor anchor)
     : base(width, height, anchor)
 {
     this.overlapEvent = overlapEvent;
     vectorControl = new VectorControl(this);
 }
示例#7
0
 public FieldInstance(E_OverlapEvent overlapEvent, float width, float height, WorldAnchor anchor)
     : base(width, height, anchor)
 {
     this.overlapEvent = overlapEvent;
     vectorControl = new VectorControl(this);
 }
示例#8
0
文件: TileLayer.cs 项目: pb0/ID0_Test
 private Subject2 AddSubject(float initX, float initY, float width, float height, WorldAnchor anchor)
 {
     return null;
 }
示例#9
0
文件: Subject2.cs 项目: pb0/ID0_Test
 public Subject2(float width, float height, WorldAnchor anchor)
 {
     this.width = width;
     this.height = height;
     this.anchor = anchor;
 }
示例#10
0
 public ObjectHolder(float width, float height, WorldAnchor anchor)
     : base(width, height, anchor)
 {
 }