Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

KoduActionScore.cc

Go to the documentation of this file.
00001 #include "Kodu/Primitives/KoduActionScore.h"
00002 #include "Kodu/Keepers/ScoreKeeper.h"
00003 
00004 namespace Kodu {
00005 
00006     ScoreChange KoduActionScore::getScoreChange() {
00007         return ScoreChange(type, designator, static_cast<unsigned int>(numericGen.getNumericValue()));
00008     }
00009 
00010     bool KoduActionScore::isSameTypeAs(const KoduPrimitive* kPrimitive) {
00011         return (dynamic_cast<const KoduActionScore*>(kPrimitive) != NULL);
00012     }
00013 
00014     void KoduActionScore::reinitialize() {
00015         KoduAction::reinitialize();
00016     }
00017 
00018     void KoduActionScore::printAttrs() const {
00019         KoduAction::printAttrs();
00020         std::cout << "Score operation type: ";
00021         switch (type) {
00022             case ST_SCORE:
00023                 std::cout << "score";
00024                 break;
00025 
00026             case ST_SET_SCORE:
00027                 std::cout << "set score";
00028                 break;
00029 
00030             case ST_SUBTRACT:
00031                 std::cout << "subtract";
00032                 break;
00033         }
00034         std::cout << std::endl;
00035         std::cout << "Score designator: " << designator << std::endl;
00036         numericGen.printAttrs();
00037         std::cout << std::endl;
00038     }
00039 } // end of Kodu namespace

Tekkotsu v5.1CVS
Generated Mon May 9 04:58:43 2016 by Doxygen 1.6.3