Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 3
0
    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);
    }
Exemplo n.º 4
0
    public Tile(LayerInfo layerInfo, WorldAnchor anchor)
        : base(layerInfo.width, layerInfo.height, anchor)
    {
        if (layerInfo == null)
        {
            Debug.LogError("must not be null");
        }

        this.tileInfo = layerInfo;
    }
Exemplo n.º 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;
 }
Exemplo n.º 6
0
 public FieldObject(OverlapEventType overlapEvent, float width, float height, WorldAnchor anchor)
     : base(width, height, anchor)
 {
     this.overlapEvent = overlapEvent;
     vectorControl = new VectorControl(this);
 }
Exemplo n.º 7
0
 public FieldInstance(E_OverlapEvent overlapEvent, float width, float height, WorldAnchor anchor)
     : base(width, height, anchor)
 {
     this.overlapEvent = overlapEvent;
     vectorControl = new VectorControl(this);
 }
Exemplo n.º 8
0
 private Subject2 AddSubject(float initX, float initY, float width, float height, WorldAnchor anchor)
 {
     return null;
 }
Exemplo n.º 9
0
 public Subject2(float width, float height, WorldAnchor anchor)
 {
     this.width = width;
     this.height = height;
     this.anchor = anchor;
 }
Exemplo n.º 10
0
 public ObjectHolder(float width, float height, WorldAnchor anchor)
     : base(width, height, anchor)
 {
 }