Atomineer Utils의 Intellisense 및 Atomineer에 대한 Microsoft의 감사 ... 이러한 매개 변수는 모두 필요하며 변경할 수 없음입니다.13 개 매개 변수 생성자 개선
더 좋은 방법이 있나요?
/**************************************************************************************************
* <summary>Initializes a new instance of the ADTBattleCharacter class.</summary>
* <param name="name"> The name of the character.</param>
* <param name="max_HP"> The maximum hit points.</param>
* <param name="max_MP"> The maximum magic power.</param>
* <param name="strength"> The strength.</param>
* <param name="agility"> The agility.</param>
* <param name="attack_power"> The attack power.</param>
* <param name="defense_power">The defense power.</param>
* <param name="gold"> The gold carried by the character.</param>
* <param name="experience"> The experience the character is worth.</param>
* <param name="stop_resist"> The character's resistance to stopspell.</param>
* <param name="sleep_resist"> The character's resistance to sleep.</param>
* <param name="hurt_resist"> The character's resistance to hurt/hurtmore.</param>
* <param name="spell_list"> Available spells.</param>
**************************************************************************************************/
ADTBattleCharacter(std::string name, unsigned char max_HP, unsigned char max_MP,
unsigned char strength, unsigned char agility,
unsigned char attack_power, unsigned char defense_power,
unsigned short gold, unsigned short experience,
double stop_resist, double sleep_resist, double hurt_resist,
std::bitset<SPELL_MAX> spell_list);
모든 컨테이너 객체에이 객체들을 모두 압축하여 대신 전달할 수는 없습니까? –
구조체에 em을 넣고, 기본값을 주거나, 다른 것들을 기반으로하고, 필요한 것을 변경하고, 구조체를 전달하십시오. – chris
@chris, 그냥 구조체의 생성자에 문제가 punts. 정말로 아무것도 바뀌지 않습니다. –