public void RefreshOccupiedGridPositions()
 {
     if (BagManager.Instance.MechaComponentOccupiedGridPosDict.ContainsKey(MechaComponentInfo.MechaComponentType))
     {
         MechaComponentInfo.OccupiedGridPositions = GridPos.TransformOccupiedPositions(MechaComponentInfo.GridPos, BagManager.Instance.MechaComponentOccupiedGridPosDict[MechaComponentInfo.MechaComponentType]);
     }
 }
示例#2
0
        private void ExecuteOutputPower(Ability parentAbility, ExecuteInfo executeInfo)
        {
            if (parentAbility == executeInfo.Ability)
            {
                int finalOutputPower = OutputPower;
                switch (executeInfo.MechaComponentInfo.CurrentQualityUpgradeData)
                {
                case QualityUpgradeData_Engine pud_Engine:
                {
                    finalOutputPower = pud_Engine.OutputPower;
                    break;
                }
                }

                executeInfo.MechaComponentInfo.AccumulatedPowerInsideThisFrame = finalOutputPower;
                List <GridPos> allSlotLocalPositions_Local  = executeInfo.MechaComponentInfo.OriginalAllSlotLocalPositions;
                List <GridPos> allSlotLocalPositions_Matrix = GridPos.TransformOccupiedPositions(executeInfo.MechaComponentInfo.InventoryItem.GridPos_Matrix, allSlotLocalPositions_Local.Clone());
                foreach (GridPos gp in allSlotLocalPositions_Matrix)
                {
                    executeInfo.MechaInfo.ProvidePower(gp, finalOutputPower);
                }
            }
        }