亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? person.h

?? 模擬游戲中人的行走
?? H
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
// ============================================================================
// Person.h
// Contains the person class
// ============================================================================
#ifndef PERSON_H
#define PERSON_H

#include "Object.h"
#include "Item.h"
#include "DLinkedList.h"



// ============================================================================
//  Person Class
// ============================================================================
class Person : public Object
{
protected:
// =======================================================
//  Data
// =======================================================

// -------------------------------------------------------
// Name:        m_health
// Description: the health of the person
// -------------------------------------------------------
    int m_health;

// -------------------------------------------------------
// Name:        m_armor
// Description: the armor of the person
// -------------------------------------------------------
    int m_armor;

// -------------------------------------------------------
// Name:        m_type
// Description: the type of the person
// -------------------------------------------------------
    int m_type;

// -------------------------------------------------------
// Name:        m_direction
// Description: the direction of the person
// -------------------------------------------------------
    int m_direction;

// -------------------------------------------------------
// Name:        m_inventory
// Description: the inventory of the person
// -------------------------------------------------------
    DLinkedList<Item*> m_inventory;

// -------------------------------------------------------
// Name:        m_currentweapon
// Description: an iterator pointing to the current weapon
// -------------------------------------------------------
    DListIterator<Item*> m_currentweapon;

// -------------------------------------------------------
// Name:        m_graphics
// Description: a 2D array of graphics that make up the
//              sprite animation.
// -------------------------------------------------------
    SDL_Surface* m_graphics[DIRECTIONS][FRAMES];
    
// -------------------------------------------------------
// Name:        m_lastattack
// Description: Keeps track of the last time that the
//              player has attacked
// -------------------------------------------------------
    int m_lastattack;

// -------------------------------------------------------
// Name:        m_lastmove
// Description: Keeps track of the last time that the
//              player has moved
// -------------------------------------------------------
    int m_lastmove;

// -------------------------------------------------------
// Name:        m_attackmodifier
// Description: the "handicap" of the player. Determines
//              how much faster or slower (milliseconds)
//              the person attacks
// -------------------------------------------------------
    int m_attackmodifier;


    
public:
// =======================================================
//  Functions
// =======================================================

// -------------------------------------------------------
// Name:        Person
// Description: Constructs the person
// -------------------------------------------------------
    Person()
    {
        // set the person type to 0
        m_type = 0;

        // set up the health and armor
        m_health = 100;
        m_armor = 100;

        // set up the initial direction (pointing down)
        m_direction = 2;

        m_currentweapon = m_inventory.GetIterator();

        // clear the images
        int f, d;
        for( d = 0; d < DIRECTIONS; d++ )
        {
            for( f = 0; f < FRAMES; f++ )
            {
                m_graphics[d][f] = 0;
            }
        }

        // clear the timers
        m_lastmove = 0;
        m_lastattack = 0;
        m_attackmodifier = 0;
    }

// -------------------------------------------------------
// Name:        ~Person
// Description: Destructs the person, and deletes all of 
//              their inventory
// -------------------------------------------------------
    ~Person()
    {
        DListIterator<Item*> itr = m_inventory.GetIterator();
        for( itr.Start(); itr.Valid(); itr.Forth() )
        {
            if( itr.Item() != 0 )
                delete itr.Item();
        }
    }

// -------------------------------------------------------
// Name:        Copy Constructor/assignment operator
// Description: this is the copy constructor, it copies
//              a player to another
// -------------------------------------------------------
    Person( Person& p_person )
    {
        *this = p_person;
    }

    void operator= ( Person& p_person )
    {
        int d, f;

        m_health    = p_person.m_health;
        m_armor     = p_person.m_armor;
        m_type      = p_person.m_type;
        m_direction = p_person.m_direction;
    
        for( d = 0; d < DIRECTIONS; d++ )
        {
            for( f = 0; f < FRAMES; f++ )
            {
                m_graphics[d][f] = p_person.m_graphics[d][f];
            }
        }

        // don't copy the inventory over.

        m_lastattack = p_person.m_lastattack;
        m_lastmove   = p_person.m_lastmove;
        m_attackmodifier = p_person.m_attackmodifier;
        m_x = p_person.m_x;
        m_y = p_person.m_y;
        m_cell = p_person.m_cell;
    }


// -------------------------------------------------------
// Name:        GetDirection
// Description: Gets the direction of the person
// -------------------------------------------------------
    int GetDirection()
    {
        return m_direction;
    }

    
// -------------------------------------------------------
// Name:        SetDirection
// Description: Sets the direction of the person
// -------------------------------------------------------
    void SetDirection( int p_direction )
    { 
        m_direction = (p_direction + 4) % 4;
    }

    
// -------------------------------------------------------
// Name:        SetPersonType
// Description: Sets the type of the person
// -------------------------------------------------------
    void SetPersonType( int p_type )
    {
        m_type = p_type;
    }

    
// -------------------------------------------------------
// Name:        GetPersonType
// Description: Gets the type of the person
// -------------------------------------------------------
    int GetPersonType()
    { 
        return m_type; 
    }


// -------------------------------------------------------
// Name:        SetHealth
// Description: sets the health of the person
// -------------------------------------------------------
    void SetHealth( int p_health )
    { 
        // set the health, and make sure it doesn't go below 0 or above 100;
        m_health = p_health;  
        if( m_health < 0 )
            m_health = 0;
        if( m_health > 100 )
            m_health = 100;
    }

    
// -------------------------------------------------------
// Name:        GetHealth
// Description: gets the health of the person
// -------------------------------------------------------
    int GetHealth()
    { 
        return m_health; 
    }


// -------------------------------------------------------
// Name:        SetArmor
// Description: sets the armor of the person
// -------------------------------------------------------
    void SetArmor( int p_armor )
    { 
        m_armor = p_armor;
        if( m_armor < 0 )
            m_armor = 0;
        if( m_armor > 100 )
            m_armor = 100;
    }
    

// -------------------------------------------------------
// Name:        GetArmor
// Description: gets the armor of the person

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产丶欧美丶日本不卡视频| 久久精品人人做人人综合| 91精品国产色综合久久不卡电影 | 蜜臀av一区二区三区| 99久久综合精品| 久久综合色8888| 免费视频最近日韩| 欧美日韩免费观看一区三区| 中文字幕亚洲成人| 国产精品自拍在线| 精品国产百合女同互慰| 丝瓜av网站精品一区二区| 99re在线视频这里只有精品| 国产日韩欧美精品电影三级在线| 麻豆成人免费电影| 欧美一区二区三区视频免费 | 欧美在线观看视频一区二区三区| 国产日韩欧美a| 国内精品久久久久影院一蜜桃| 亚洲综合精品久久| 国产亚洲婷婷免费| 91女厕偷拍女厕偷拍高清| 日本特黄久久久高潮| 国产精品久久看| 91麻豆精品国产综合久久久久久| 亚洲成人手机在线| 欧美在线三级电影| 午夜精品免费在线观看| 国产欧美日韩卡一| 欧美精品丝袜中出| 国产精品1024| 一区二区三区欧美亚洲| 久久综合丝袜日本网| 欧美日韩激情一区二区| 国产白丝网站精品污在线入口| 亚洲va韩国va欧美va| 亚洲精品国产视频| 日本成人中文字幕在线视频| 久久久久99精品一区| 久久久亚洲综合| 亚洲va中文字幕| 欧美一区二区三区在线电影| 国内精品伊人久久久久av影院| 久久久久久久电影| av不卡在线播放| 亚洲成人久久影院| 久久久久青草大香线综合精品| 欧美一区二区三区日韩| 久久综合资源网| 中文字幕欧美国产| 亚洲大片一区二区三区| 欧美在线视频你懂得| 中文字幕亚洲精品在线观看| 国产一区高清在线| 粉嫩av一区二区三区在线播放| 国产精品中文字幕日韩精品| 91亚洲精品久久久蜜桃网站| 欧美日本视频在线| 久久综合资源网| 亚洲成av人**亚洲成av**| 国产精品家庭影院| 亚洲你懂的在线视频| 中文字幕日本不卡| 中文字幕一区二区三区在线观看| 国产精品乱人伦| 中文字幕中文字幕在线一区| 亚洲成人手机在线| 在线观看一区二区精品视频| 久久成人麻豆午夜电影| 欧美一区二区三区在线| av在线综合网| 免费成人在线观看| 亚洲人成网站影音先锋播放| 欧美电影免费观看高清完整版在线| eeuss鲁片一区二区三区| 五月天国产精品| 国产精品国产三级国产普通话三级 | 国产精品美女久久久久久| 欧美日韩一区成人| 成人午夜激情片| 免费成人在线观看| 一区二区三区欧美久久| 欧美草草影院在线视频| 一本色道久久综合狠狠躁的推荐| 久久精品国产亚洲5555| 亚洲风情在线资源站| 国产精品天美传媒沈樵| 日韩精品中文字幕在线一区| 色欧美乱欧美15图片| 国产乱对白刺激视频不卡| 日韩成人伦理电影在线观看| 亚洲精品国产无天堂网2021| 国产日韩欧美亚洲| 欧美不卡视频一区| 欧美精品久久久久久久多人混战| av网站一区二区三区| 国产一区三区三区| 免费人成黄页网站在线一区二区| 亚洲人午夜精品天堂一二香蕉| 久久精品一区二区三区av| 日韩欧美一二三四区| 色综合久久中文综合久久97| 国产精品888| 韩国三级在线一区| 蜜臀精品一区二区三区在线观看| 一区二区三区欧美| 亚洲色图19p| 亚洲国产成人一区二区三区| 久久午夜色播影院免费高清| 日韩欧美一区二区在线视频| 欧美色中文字幕| 91日韩精品一区| 成人综合婷婷国产精品久久蜜臀| 久久99精品久久久久久动态图 | 成人性视频网站| 国产一区二三区好的| 蜜桃av噜噜一区二区三区小说| 亚瑟在线精品视频| 亚洲电影中文字幕在线观看| 亚洲精品成a人| 亚洲日本在线天堂| 中文字幕在线观看不卡视频| 国产精品三级av| 国产欧美1区2区3区| 日本一区二区三区久久久久久久久不 | 欧美色欧美亚洲另类二区| 国产精品夫妻自拍| 99久久免费国产| 自拍偷自拍亚洲精品播放| 成人激情开心网| 亚洲综合激情另类小说区| 97久久精品人人爽人人爽蜜臀| 国产欧美一区在线| 成人av电影免费观看| 国产精品夫妻自拍| 色视频欧美一区二区三区| 亚洲香蕉伊在人在线观| 欧美日韩在线免费视频| 日本成人在线一区| 欧美tickling网站挠脚心| 国产一区不卡视频| 国产精品蜜臀av| 日本精品一级二级| 久久精品国产一区二区三区免费看| 亚洲日本在线a| 91福利视频久久久久| 一区二区三区.www| 91美女在线视频| 午夜伊人狠狠久久| 精品奇米国产一区二区三区| 欧美精品色一区二区三区| 51精品久久久久久久蜜臀| 91精品国产色综合久久不卡电影 | 成人国产精品免费观看视频| eeuss鲁片一区二区三区| 色婷婷av一区二区三区大白胸| 欧美色男人天堂| 日韩一二三区不卡| 国产日产欧美一区| 亚洲同性gay激情无套| 亚洲国产日韩综合久久精品| 免费一级片91| 国产福利一区二区三区视频在线 | 日韩精品成人一区二区在线| 国产在线视频精品一区| 成人午夜激情视频| 欧美性高清videossexo| 欧美成人r级一区二区三区| 日本一区二区三区高清不卡| 亚洲自拍偷拍图区| 麻豆中文一区二区| 成人午夜激情片| 欧美日韩国产高清一区| 精品国产一二三| ...xxx性欧美| 午夜精品123| 国产成人精品三级| 欧美日韩综合一区| 亚洲五月六月丁香激情| 极品少妇xxxx精品少妇偷拍| 成人黄色777网| 欧美日韩成人在线| 国产日韩精品一区二区三区在线| 一二三四区精品视频| 激情五月婷婷综合网| 91色视频在线| 精品国产乱码久久久久久影片| 亚洲伦理在线精品| 久88久久88久久久| 91久久一区二区| 精品国产成人在线影院 | 国产精品色哟哟| 性做久久久久久久久| 高清国产一区二区三区| 欧美性一区二区| 国产欧美日韩综合| 日韩一区精品字幕| k8久久久一区二区三区| 日韩欧美一级精品久久| 一区二区三区四区高清精品免费观看 |