Exemple #1
0
    private void UpdateValueType(ProductValueType productType, ref ProductVals currentVals)
    {
        if (productType == ProductValueType.TAB)
        {
            string newVal = GetActiveTab();
            if (newVal != currentActiveTab && newVal != "")
            {
                currentActiveTab = newVal;
                dirtyFlags      |= (int)productType;
            }
        }
        else
        {
            ProductVals newVals  = new ProductVals();
            string      elemName = ProductHelper.GetValueDivName(productType, IDTag);
            string      cmd      = ProductHelper.GetDisplayValueCmd(elemName);
            newVals.val = GetCmdStrResult(cmd);
            if (newVals.val != currentVals.val)
            {
                elemName          = ProductHelper.GetSliderElemName(productType);
                cmd               = ProductHelper.GetSliderPositionCmd(elemName);
                newVals.sliderVal = GetCmdStrResult(cmd);

                currentVals = newVals;
                dirtyFlags |= (int)productType;
            }
        }
    }
Exemple #2
0
 protected override void Awake()
 {
     base.Awake();
     stageItem = 100;
     AddProductToList(id, this);
     currentActiveTab = "sales";
     blankVal         = new ProductVals("", "");
     refreshOnInvestmentBudgetChange = true;
 }
Exemple #3
0
    public void UpdateServerWithNewValues(ProductVals newVals)
    {
        if (newVals.val == "")
        {
            return;
        }

        ISFSObject productUpdateObj = CreateProductUpdateMessageWithID();

        productUpdateObj.PutUtfString("v", newVals.val);        // value
        productUpdateObj.PutUtfString("sv", newVals.sliderVal); // slider value
        CommunicationManager.SendObjectMsg(productUpdateObj);
    }
Exemple #4
0
 private void UpdateProductValue(ProductValueType valueType, string newValue, string newSliderValue, ref ProductVals valsToUpdate)
 {
     UpdateSlider(ProductHelper.GetSliderElemName(valueType), newSliderValue);
     UpdateDisplayValue(ProductHelper.GetValueDivName(valueType, IDTag), newValue);
     valsToUpdate.val       = newValue;
     valsToUpdate.sliderVal = newSliderValue;
 }