protected void InitializePropertyContainer()
 {
     if (propertyContainer == null)
     {
         propertyContainer = GetComponent <InputPropertyContainer>();
     }
 }
        public MouseInputState(TargetMousePosition mouseCorner, InputPropertyContainer propertyContainer, RectTransform transformTarget)
        {
            this.mouseCorner     = mouseCorner;
            this.transformTarget = transformTarget;

            this.propertyContainer = propertyContainer;

            InitializeState();
        }
        public MouseInputState(InputPropertyContainer propertyContainer, RectTransform transformTarget)
        {
            this.mouseCorner     = TargetMousePosition.NO_CORNER;
            this.transformTarget = transformTarget;

            this.propertyContainer = propertyContainer;

            currentMousePosition = Vector2.zero;

            InitializeState();
        }
Пример #4
0
        public MobileInputStateEvaluator(Camera camera, RectTransform selectionRect, BoxCollider2D selectionRectCollider, InputPropertyContainer propertyContainer)
        {
            this.camera = camera;
            this.selectionRectCollider = selectionRectCollider;
            this.selectionRect         = selectionRect;
            List <Touch> currentTouches = GetTouches();

            UpdateTouchPositions(currentTouches);
            currentTouchCount = TouchPositions.Count;
            PropertyContainer = propertyContainer;
        }
 public MouseOverRectState(TargetMousePosition mouseCorner, InputPropertyContainer mousePropertyContainer, RectTransform transformTarget)
     : base(mouseCorner, mousePropertyContainer, transformTarget)
 {
     mover = new RectMover(transformTarget);
 }
Пример #6
0
 public MobileSelectionRectScaleState(RectTransform transformTarget, InputPropertyContainer propertyContainer) : base(transformTarget)
 {
     touchPointConnection   = Vector2.zero;
     this.propertyContainer = propertyContainer;
 }
 public MouseOverCornerState(TargetMousePosition mouseCorner, InputPropertyContainer mousePropertyContainer, RectTransform transformTarget)
     : base(mouseCorner, mousePropertyContainer, transformTarget)
 {
     oldRectPosition = transformTarget.position;
     oldSizeDelta    = transformTarget.sizeDelta;
 }
 public MouseDragState(TargetMousePosition mouseCorner, InputPropertyContainer mousePropertyContainer, RectTransform transformTarget)
     : base(mouseCorner, mousePropertyContainer, transformTarget)
 {
     mouseDown = false;
 }
 public ScaleState(float triggerDistance, InputPropertyContainer mousePropertyContainer, RectTransform transformTarget) :
     base(mousePropertyContainer, transformTarget)
 {
     currentMousePosition = Vector2.zero;
 }