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

📄 pythonlogic.h

📁 这是书籍Premier.Press.MUD.GAME.PROGRAMMING.rar的源码
💻 H
字号:
// MUD Programming
// Ron Penton
// (C)2003
// PythonLogic.h - This file contains a python logic module
// 
// 


#ifndef BETTERMUDPYTHONLOGIC_H
#define BETTERMUDPYTHONLOGIC_H

#include "../Logic.h"
#include "PythonScript.h"

namespace BetterMUD
{


class PythonLogic : public Logic
{
public:
    PythonLogic( PythonInstance* p_inst )
        : m_instance( p_inst ) {}

    ~PythonLogic()
    {
        delete m_instance;
    }

    std::string Name()
    {
        return m_instance->Name();
    }


    void Init( entityid p_id );

    // get the state of the script, meaning varies depending on application
    int Attribute( const std::string& p_attr );

    // perform an action. return value varies depending on application
    int DoAction( const Action& p_action );

protected:
    PythonInstance* m_instance;

};  // end class Logic

}   // end namespace BetterMUD


#endif

⌨️ 快捷键说明

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