더북(TheBook)
#define OffsetOf(c, mv) ((size_t) & (static_cast<c*>(nullptr)->mv)))

class MouseStatus
{
public:
    std::string mName;
    int mLegCount, mHeadCount;
    float mHealth;
    
    static DataType* sDataType;
    static void InitDataType()
    {
        sDataType = new DataType(
        {
            MemberVariable("mName",
                EPT_String, OffsetOf(MouseStatus,mName)),
            MemberVariable("mLegCount",
                EPT_Int, OffsetOf(MouseStatus, mLegCount)),
            MemberVariable("mHeadCount",
                EPT_Int, OffsetOf(MouseStatus, mHeadCount)),
            MemberVariable("mHealth",
                EPT_Float, OffsetOf(MouseStatus, mHealth))
        });
    }
};
신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.