コード例 #1
0
ファイル: ManufactoryBase.cs プロジェクト: EpicProj/RPG
 public void RefreshFormula(int formulaID)
 {
     CurrentFormulaID   = formulaID;
     currentFormulaData = FormulaModule.GetFormulaDataByID(formulaID);
     currentInputItem   = FormulaModule.GetFormulaItemList(formulaID, FormulaModule.MaterialProductType.Input);
     currentOutputItem  = FormulaModule.GetFormulaOutputMaterial(formulaID);
     currentEnhanceItem = FormulaModule.GetFormulaEnhanceMaterial(CurrentFormulaID);
 }
コード例 #2
0
ファイル: ManufactoryBase.cs プロジェクト: EpicProj/RPG
 public ManufactFormulaInfo(int currentFormulaID)
 {
     CurrentFormulaID   = currentFormulaID;
     currentFormulaData = FormulaModule.GetFormulaDataByID(currentFormulaID);
     currentInputItem   = FormulaModule.GetFormulaItemList(currentFormulaID, FormulaModule.MaterialProductType.Input);
     currentOutputItem  = FormulaModule.GetFormulaOutputMaterial(currentFormulaID);
     currentEnhanceItem = FormulaModule.GetFormulaEnhanceMaterial(currentFormulaID);
     MaxNeedTime        = currentFormulaData.ProductSpeed;
     NotChoose          = false;
 }
コード例 #3
0
ファイル: ManufactoryBase.cs プロジェクト: EpicProj/RPG
        public ManufactFormulaInfo(int currentFormulaID, FunctionBlock block)
        {
            CurrentFormulaID   = currentFormulaID;
            FormulaChooseList  = FunctionBlockModule.GetBlockFormulaList(block.FunctionBlockID);
            currentFormulaData = FormulaModule.GetFormulaDataByID(currentFormulaID);
            currentInputItem   = FormulaModule.GetFormulaItemList(currentFormulaID, FormulaModule.MaterialProductType.Input);
            currentOutputItem  = FormulaModule.GetFormulaOutputMaterial(currentFormulaID);
            currentEnhanceItem = FormulaModule.GetFormulaEnhanceMaterial(currentFormulaID);
            MaxNeedTime        = currentFormulaData.ProductSpeed;

            for (int i = 0; i < currentInputItem.Count; i++)
            {
                realInputItem.Add(new FormulaItem(currentInputItem[i].model, 0));
            }

            realOutputItem  = new FormulaItem(currentOutputItem.model, 0);
            realEnhanceItem = new FormulaItem(currentEnhanceItem.model, 0);
            NotChoose       = false;
        }
コード例 #4
0
        /// <summary>
        /// 获取原料列表
        /// </summary>
        /// <param name="formulaID"></param>
        /// <param name="Gettype"></param>
        /// <returns></returns>
        public static List <FormulaItem> GetFormulaItemList(int formulaID, MaterialProductType Gettype)
        {
            List <FormulaItem>       result  = new List <FormulaItem>();
            Dictionary <int, ushort> infoDic = GetFormulaMaterialList(formulaID, Gettype);

            if (infoDic.Count == 0)
            {
                return(result);
            }
            if (infoDic != null)
            {
                foreach (KeyValuePair <int, ushort> kvp in infoDic)
                {
                    Material    ma   = MaterialModule.GetMaterialByMaterialID(kvp.Key);
                    FormulaItem item = new FormulaItem(ma, kvp.Value);
                    result.Add(item);
                }
            }
            return(result);
        }