⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 door.h

📁 c++游戏源码 素材文件 需要openAl32.dll可以在网上下载
💻 H
字号:
#ifndef DOOR_H
#define DOOR_H

#include "WorldObject.h"

class invasion;

class door : public world_object
{
public:
    // The door will go from one state to another
    //  depending on user input and other events.
    enum state
    {
        STATE_CLOSED,
        STATE_OPENING,
        STATE_OPEN,
        STATE_CLOSING
    };

    door();
    
    std::string Type();

    bool LoadResources();

    bool Update(
        invasion *theGame);
    
    bool Render(
        invasion *theGame);
    
    void Hit(
        world_object &stationary);

    // We have the key, open the door!
    void Open( world_object *new_opener);

private:
    door::state currState;
    vectorf velocity;
    world_object *opener;
    sound openingSound;
    sound closingSound;

public:
    sprite mySprite;
};


inline std::string
door::Type()
{
    return "door";
}
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -