Skip to content

Instantly share code, notes, and snippets.

@coligne
Created April 5, 2018 04:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coligne/eea26983ed73efa25e69251345ce7ba4 to your computer and use it in GitHub Desktop.
Save coligne/eea26983ed73efa25e69251345ce7ba4 to your computer and use it in GitHub Desktop.
性格によって話しかけたときの反応が変わるソース
//Person2.cpp
#include "Person.hpp"
Person::Person(Character character):_Char(character){}
void Person::Talk_To(){
if(_Char == Cheerful){
std::cout << "Hey bro!" << std::endl;
}else{
std::cout << "Ah... Hi..." << std::endl;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment