private void UpdateHitTypeInfo(PLAYER_ACTION_TYPE type, int damage) { DeliveryBattleInfo.PlayerActionInfo playerActionInfo = null; int i = 0; for (int count = deliveryBattleInfo.playerActionInfoList.Count; i < count; i++) { DeliveryBattleInfo.PlayerActionInfo playerActionInfo2 = deliveryBattleInfo.playerActionInfoList[i]; if (playerActionInfo2.actionType == (int)type) { playerActionInfo = playerActionInfo2; break; } } if (playerActionInfo != null) { playerActionInfo.totalCount++; playerActionInfo.totalDamage += damage; } else { DeliveryBattleInfo.PlayerActionInfo item = new DeliveryBattleInfo.PlayerActionInfo(type, damage, 1); deliveryBattleInfo.playerActionInfoList.Add(item); } }
public PlayerActionInfo(PLAYER_ACTION_TYPE type, int damage, int count) { actionType = (int)type; totalDamage = damage; totalCount = count; }