こんなゲッターは嫌だ
// 男 class Man { public: Man(float height, float weight, int32 wild) : m_height(height) , m_weight(weight) , m_wild(wild) {} // 身長取得 [[nodiscard]] float getHeight() const { return m_height; } // 体重取得 [[nodiscard]] float getWeight() const { return m_weight; } // Get Wild [[nodiscard]] int32 getWild() const { s3d::System::LaunchBrowser(U"https://www.youtube.com/watch?v=NHKq8IOXPxA&t=1m02s"); return m_wild; } private: // 身長cm float m_height; // 体重kg float m_weight; // ワイルドさ int32 m_wild; }; void Main() { Man ryo{ 186.0, 72.0, 99999 }; while (System::Update()) { if (KeySpace.down()) { Print << U"[Height] " << ryo.getHeight(); Print << U"[Weight] " << ryo.getWeight(); Print << U"[Wild] " << ryo.getWild(); } } }
ポイント
YoutubeのURLの秒数指定でちょうどサビから始まるようになってます。
ダメな所
広告が流れ出すとめちゃめちゃガッカリします