当前位置: 首页>>代码示例>>C++>>正文


C++ cPlayer::StatsDisplay方法代码示例

本文整理汇总了C++中cPlayer::StatsDisplay方法的典型用法代码示例。如果您正苦于以下问题:C++ cPlayer::StatsDisplay方法的具体用法?C++ cPlayer::StatsDisplay怎么用?C++ cPlayer::StatsDisplay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cPlayer的用法示例。


在下文中一共展示了cPlayer::StatsDisplay方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main


//.........这里部分代码省略.........

    #pragma region Admin/Save Check

    if (Player.AdminAcess);
    else if (cUtil::CheckFile("save.txt"))
    {
        cout << "Save found! L = Load , N = Delete and create new" << endl;
        char Choice = _getch();

        if (cUtil::Check(Choice, 'L'))
            Player.Load();
        else if (cUtil::Check(Choice, 'N'))
        {
            cUtil::DelFile("Save.txt");
            system("CLS");
            Player.Creation();
        }
        else
        {
            cUtil::Fail(0);
            return 0;
        }
    }
    else Player.Creation();
    system("CLS");

    #pragma endregion

    #pragma region Result Check

    if (Player.AdminAcess)
    {
        cout << "Welcome to Test go!" << endl;
        Player.Name = "Tester";
        Player.Age = 18;
        Player.Gender = 0;
        Player.Money = 9999;
        Player.Belogings[BEL_HOME] = true;
        // Need to fix this to be able to access every event or make adjustments to function another "if" or something or be able to modify my stats as i go
        // set age to Wizard The internet Virgin
    }
    else if (!Player.Loaded)
        cout << "You have successfully created User!" << endl;
    else
        cout << "You have successfully loaded User save" << endl;

    #pragma endregion

    Player.StatsDisplay();

    #pragma region Tutorial
    system("CLS");
    cout << "In next screen u will see map" << endl;
    cout << "some basic controls:" << endl;
    cout << "Arrow keys for moving" << endl;
    cout << "5 or Enter - use(while P is on E)" << endl;
    cout << "C will show character info" << endl;
    cout << "and E or ESC will prompt save and exit" << endl;
    system("pause > nul");
    #pragma endregion

    #pragma region Main Game loop

    int TheNumber = 0;
    bool Running = true;

    char playerLastSpot = ' ';

    int eventCount = 0;
    int eventCountLimit = 2;

    while (Running)
    {
        system("CLS");

        while (eventCount != eventCountLimit)
            Map.PlaceEvent(eventCount);

        Map.FindObject(Map.playerCord.x, Map.playerCord.y, 'P');

        //Map.DisplayMap();
        Map.DisplayPartOfMap(Map.playerCord.x, Map.playerCord.y, 4);

        char Choice = _getch();
        int iChoice = cUtil::CharToInt(Choice);
        Map.Movement(Choice, playerLastSpot);

        if (playerLastSpot == 'E' && (Choice == '5' || iChoice == 13))
        {
            playerLastSpot = ' ';
            eventCount--;

            system("CLS");
            if (Player.AdminAcess)
            {
                cout << "As tester/game creator you can choose TheNumber!" << endl;
                cin >> TheNumber;
            }
            else
            {
开发者ID:Drakoshi,项目名称:RandomVille,代码行数:101,代码来源:Main.cpp


注:本文中的cPlayer::StatsDisplay方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。