예제 #1
0
    public TestItemIcon CreateTestItemIcon(out IItemIconConstArg arg)
    {
        IItemIconConstArg thisArg = Substitute.For <IItemIconConstArg>();
        IUIManager        uim     = Substitute.For <IUIManager>();

        thisArg.uim.Returns(uim);
        IItemIconUIAdaptor iiUIA = Substitute.For <IItemIconUIAdaptor>();

        thisArg.uia.Returns(iiUIA);
        IItemIconImage itemIconImage = Substitute.For <IItemIconImage>();

        thisArg.image.Returns(itemIconImage);
        IItemIconTransactionManager iiTAM = Substitute.For <IItemIconTransactionManager>();

        thisArg.iiTAM.Returns(iiTAM);
        IUIItem item = Substitute.For <IUIItem>();

        thisArg.item.Returns(item);
        IItemIconTransactionStateEngine iiTAStateEngine = Substitute.For <IItemIconTransactionStateEngine>();

        thisArg.iiTAStateEngine.Returns(iiTAStateEngine);
        IItemIconEmptinessStateEngine emptinessStateEngine = Substitute.For <IItemIconEmptinessStateEngine>();

        thisArg.emptinessStateEngine.Returns(emptinessStateEngine);
        ITransferabilityHandlerImplementor transferabilityHandlerImplementor = Substitute.For <ITransferabilityHandlerImplementor>();

        thisArg.transferabilityHandlerImplementor.Returns(transferabilityHandlerImplementor);

        TestItemIcon testItemIcon = new TestItemIcon(thisArg);

        arg = thisArg;
        return(testItemIcon);
    }
        public ItemIconEmptificationProcessConstArg(
            IProcessManager processManager,
            float expireTime,

            IItemIconImage itemIconImage,
            IItemIconEmptinessStateEngine engine
            ) : base(
                processManager,
                ProcessConstraint.ExpireTime,
                expireTime,
                false
                )
        {
            thisItemIconImage = itemIconImage;
            thisEngine        = engine;
        }
        public IItemIconDisemptifyProcess CreateItemIconDisemptifyProcess(
            IItemIconImage itemIconImage,
            IItemIconEmptinessStateEngine engine
            )
        {
            float expireT = thisProcessManager.GetImageEmptificationExpireTime();
            IItemIconEmptificationProcessConstArg arg = new ItemIconEmptificationProcessConstArg(
                thisProcessManager,
                expireT,
                itemIconImage,
                engine
                );
            IItemIconDisemptifyProcess process = new ItemIconDisemptifyProcess(arg);

            return(process);
        }
예제 #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 ItemIconEmptifyProcessConstArg(
            IProcessManager processManager,
            float expireTime,
            IItemIconImage itemIconImage,
            IItemIconEmptinessStateEngine engine,

            IItemIcon itemIcon,
            bool removesEmpty
            ) : base(
                processManager,
                expireTime,
                itemIconImage,
                engine
                )
        {
            thisItemIcon     = itemIcon;
            thisRemovesEmpty = removesEmpty;
        }
예제 #6
0
    /*  */
    public TestEqpII CreateTestEqpII(out IEquippableItemIconConstArg arg)
    {
        IEquippableItemIconConstArg thisArg = Substitute.For <IEquippableItemIconConstArg>();
        IUIManager uim = Substitute.For <IUIManager>();

        thisArg.uim.Returns(uim);
        IPickUpSystemProcessFactory pickUpSystemProcessFactory = Substitute.For <IPickUpSystemProcessFactory>();

        thisArg.processFactory.Returns(pickUpSystemProcessFactory);
        IEquipToolUIEFactory eqpToolUIEFactory = Substitute.For <IEquipToolUIEFactory>();

        thisArg.uiElementFactory.Returns(eqpToolUIEFactory);
        IEquippableItemIconAdaptor eqpIIUIA = Substitute.For <IEquippableItemIconAdaptor>();

        thisArg.uia.Returns(eqpIIUIA);
        IItemIconImage itemIconImage = Substitute.For <IItemIconImage>();

        thisArg.image.Returns(itemIconImage);
        IEquippableIITAManager eqpIITAM = Substitute.For <IEquippableIITAManager>();

        thisArg.iiTAM.Returns(eqpIITAM);
        IEquippableUIItem eqpItem = Substitute.For <IEquippableUIItem>();

        thisArg.item.Returns(eqpItem);
        IEqpIITransactionStateEngine eqpIITAStateEngine = Substitute.For <IEqpIITransactionStateEngine>();

        thisArg.iiTAStateEngine.Returns(eqpIITAStateEngine);
        IItemIconEmptinessStateEngine emptinessStateEngine = Substitute.For <IItemIconEmptinessStateEngine>();

        thisArg.emptinessStateEngine.Returns(emptinessStateEngine);
        IItemIconPickUpImplementor pickUpImplementor = Substitute.For <IItemIconPickUpImplementor>();

        thisArg.iiPickUpImplementor.Returns(pickUpImplementor);

        arg = thisArg;

        TestEqpII eqpII = new TestEqpII(thisArg);

        return(eqpII);
    }
예제 #7
0
 public ItemIconImageEmptinessInterpolator(IItemIconImage itemIconImage, float sourceEmptiness, float targetEmptiness)
 {
     thisItemIconImage   = itemIconImage;
     thisSourceEmptiness = sourceEmptiness;
     thisTargetEmptiness = targetEmptiness;
 }
예제 #8
0
 public void SetItemIcon(IItemIcon itemIcon)
 {
     thisItemIcon      = itemIcon;
     thisItemIconImage = (IItemIconImage)thisItemIcon.GetUIImage();
 }
예제 #9
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;
 }
 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)
 {
 }