コード例 #1
0
ファイル: ForwardMobType.cpp プロジェクト: ishigo974/rtype
 std::string     Forward::toString() const
 {
     return "Forward {"
            "\n\tid: " + std::to_string(getId()) +
            "\n\tname: " + getName() +
            "\n\tlives: " + std::to_string(getNbLives()) +
            "\n\tscore value: " + std::to_string(getScoreValue()) +
            "\n\tsprite file path: " + getSpriteFilePath() +
            "\n}\n";
 }
コード例 #2
0
ファイル: bird.cpp プロジェクト: Nestman-Trevor/Skeet
int Bird::hitBird()
{
    hitPoints--;
    if(checkIfDead())
    {
        isDead = true;
        return getScoreValue();
    }
    else
        return 0;
}