Exemplo n.º 1
0
        public IDigitPanelSet CreateDigitPanelSet(int digitPlace, IQuantityRoller quantityRoller, Vector2 panelDim, Vector2 padding)
        {
            IDigitPanelSetAdaptorInitializationData uiaInitData = new DigitPanelSetAdaptorInitializationData(
                digitPlace,
                panelDim,
                padding
                );
            float   panelSetWidth  = panelDim.x;
            float   panelSetHeight = panelDim.y * 2 + padding.y;
            Vector2 panelSetLength = new Vector2(panelSetWidth, panelSetHeight);
            IDigitPanelSetInstantiationData instData = new DigitPanelSetInstantiationData(
                panelSetLength,
                uiaInitData
                );
            DigitPanelSetAdaptor digitPanelSetAdaptor  = CreateInstatiableUIA <DigitPanelSetAdaptor>(instData);
            IUIAdaptor           quantityRollerAdaptor = quantityRoller.GetUIAdaptor();

            digitPanelSetAdaptor.SetParentUIA(quantityRollerAdaptor, true);
            IUIAdaptorBaseInitializationData baseInitData = quantityRollerAdaptor.GetDomainInitializationData();

            digitPanelSetAdaptor.GetReadyForActivation(
                baseInitData,
                false
                );
            IDigitPanelSet digitPanelSet = (IDigitPanelSet)digitPanelSetAdaptor.GetUIElement();

            return(digitPanelSet);
        }
Exemplo n.º 2
0
 public ItemIconConstArg(IUIManager uim, IPickUpSystemProcessFactory pickUpSystemProcessFactory, IPickUpSystemUIElementFactory pickUpSystemUIElementFactory, IItemIconUIAdaptor iiUIA, IItemIconImage itemIconImage, IUITool tool, IDragImageImplementor dragImageImplementor, IVisualPickednessStateEngine visualPickednessStateEngine, IItemIconTransactionManager iiTAM, IUIItem item, IItemIconTransactionStateEngine iiTAStateEngine, IItemIconPickUpImplementor pickUpImplementor, IItemIconEmptinessStateEngine emptinessStateEngine, ITransferabilityHandlerImplementor transferabilityHandlerImplementor, IQuantityRoller quantityRoller) : base(uim, pickUpSystemProcessFactory, pickUpSystemUIElementFactory, iiUIA, itemIconImage, tool, dragImageImplementor, visualPickednessStateEngine)
 {
     thisIITAM                = iiTAM;
     thisItem                 = item;
     thisIITAStateEngine      = iiTAStateEngine;
     thisIIPickUpImplementor  = iiPickUpImplementor;
     thisEmptinessStateEngine = emptinessStateEngine;
     thisQuantityRoller       = quantityRoller;
 }
Exemplo n.º 3
0
        void CalcAndSetRectDimension(Vector2 panelDim, Vector2 padding)
        {
            IQuantityRoller roller      = (IQuantityRoller)this.GetParentUIE();
            IUIAdaptor      rollerUIA   = roller.GetUIAdaptor();
            Rect            rollerRect  = rollerUIA.GetRect();
            float           rollerWidth = rollerRect.width;

            float height = (panelDim.y * 2) + (padding.y * 3);
            float width  = panelDim.x;
            float localX = rollerWidth - ((width + padding.x) * (thisDigitPlace + 1));
            float localY = 0f;

            ((IDigitPanelSetAdaptor)this.GetUIAdaptor()).SetRectDimension(height, width, localX, localY);
        }
Exemplo n.º 4
0
        protected override IUIElement CreateUIElement(IUIImage image)
        {
            IEquipToolActivationData                data = (IEquipToolActivationData)thisDomainInitializationData;
            IDragImageImplementorConstArg           dragImageImplementorConstArg           = new DragImageImplementorConstArg(1f, 1f, data.pickUpSystemProcessFactory, data.pickUpManager);
            IDragImageImplementor                   dragImageImplementor                   = new DragImageImplementor(dragImageImplementorConstArg);
            IVisualPickednessStateEngine            visualPickednessStateEngine            = new VisualPickednessStateEngine(data.pickUpSystemProcessFactory);
            IEqpIITransactionStateEngine            eqpIITAStateEngine                     = new EqpIITransactionStateEngine(thisEqpIITAM, thisEqpTool);
            IItemIconPickUpImplementor              itemIconPickUpImplementor              = new ItemIconPickUpImplementor(thisEqpIITAM, data.pickUpSystemUIElementFactory);
            IItemIconEmptinessStateEngine           emptinessStateEngine                   = new ItemIconEmptinessStateEngine(data.pickUpSystemProcessFactory);
            IEqpIITransferabilityHandlerImplementor eqpIITransferabilityHandlerImplementor = new EqpIITransferabilityHandlerImplementor(thisEqpIITAM);
            IItemIconImage              itemIconImage  = image as IItemIconImage;
            IQuantityRoller             quantityRoller = thisEqpToolUIEFactory.CreateItemIconQuantityRoller(this);
            IEquippableItemIconConstArg arg            = new EquippableItemIconConstArg(data.uim, data.pickUpSystemProcessFactory, data.eqpToolUIEFactory, this, itemIconImage, thisEqpTool, dragImageImplementor, visualPickednessStateEngine, thisEqpIITAM, thisEqpItem, eqpIITAStateEngine, itemIconPickUpImplementor, emptinessStateEngine, eqpIITransferabilityHandlerImplementor, quantityRoller);

            return(new EquippableItemIcon(arg));
        }
        public IOneshotQuantityAnimationProcess CreateOneshotQuantityAnimationProcess(
            IQuantityRoller quantityRoller,
            int targetQuantity
            )
        {
            IQuantityAnimationProcessConstArg arg = new QuantityAnimationProcessConstArg(
                thisProcessManager,
                ProcessConstraint.ExpireTime,
                thisProcessManager.GetQuantityAnimationProcessExpireTime(),
                true,
                targetQuantity,
                quantityRoller
                );
            OneshotQuantityAnimationProcess process = new OneshotQuantityAnimationProcess(arg);

            return(process);
        }
Exemplo n.º 6
0
        public QuantityAnimationProcessConstArg(
            IProcessManager processManager,
            ProcessConstraint processConstraint,
            float expireTime,
            bool useSpringT,

            int targetQuantity,
            IQuantityRoller quantityRoller
            ) : base(
                processManager,
                processConstraint,
                expireTime,
                true
                )
        {
            thisTargetQuantity = targetQuantity;
            thisQuantityRoller = quantityRoller;
        }
 public void SetQuantityRoller(IQuantityRoller quantityRoller)
 {
     thisQuantityRoller = quantityRoller;
 }
 public EquippableItemIconConstArg(IUIManager uim, IPickUpSystemProcessFactory pickUpSytemProcessFactory, IEquipToolUIEFactory eqpToolUIEFactory, IEquippableItemIconAdaptor uia, IItemIconImage itemIconImage, IEquipTool tool, IDragImageImplementor dragImageImplementor, IVisualPickednessStateEngine visualPickednessStateEngine, IEquippableIITAManager eqpIITAM, IEquippableUIItem item, IEqpIITransactionStateEngine eqpIITAStateEngine, IItemIconPickUpImplementor pickUpImplementor, IItemIconEmptinessStateEngine emptinessStateEngine, IEqpIITransferabilityHandlerImplementor eqpIITransferabilityHandlerImplementor, IQuantityRoller quantityRoller) : base(uim, pickUpSytemProcessFactory, eqpToolUIEFactory, uia, itemIconImage, tool, dragImageImplementor, visualPickednessStateEngine, eqpIITAM, item, eqpIITAStateEngine, pickUpImplementor, emptinessStateEngine, eqpIITransferabilityHandlerImplementor, quantityRoller)
 {
 }
 public IncrementalQuantityAnimationInterpolator(int targetQuantity, IQuantityRoller quantityRoller)
 {
     thisSourceRollerValue = quantityRoller.GetRollerValue();
     thisTargetRollerValue = targetQuantity / 1f;
     thisQuantityRoller    = quantityRoller;
 }