• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ interpreter::Runtime类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中interpreter::Runtime的典型用法代码示例。如果您正苦于以下问题:C++ Runtime类的具体用法?C++ Runtime怎么用?C++ Runtime使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: execute

                virtual void execute (Interpreter::Runtime& runtime)
                {
                    std::string topic = runtime.getStringLiteral (runtime[0].mInteger);
                    runtime.pop();

                    MWBase::Environment::get().getDialogueManager()->addTopic(topic);
                }
开发者ID:Adrian-Revk,项目名称:openmw,代码行数:7,代码来源:dialogueextensions.cpp


示例2: execute

                virtual void execute (Interpreter::Runtime& runtime)
                {
                    MWScript::InterpreterContext& context
                        = static_cast<MWScript::InterpreterContext&> (runtime.getContext());

                    std::string id = runtime.getStringLiteral (runtime[0].mInteger);
                    runtime.pop();

                    MWWorld::Ptr ptr = context.getWorld().getPtr (id, false);

                    if (mIndex==0 && MWWorld::Class::get (ptr).hasItemHealth (ptr))
                    {
                        // health is a special case
                        Interpreter::Type_Integer value =
                            MWWorld::Class::get (ptr).getItemMaxHealth (ptr);
                        runtime.push (value);

                        return;
                    }

                    Interpreter::Type_Integer value =
                        MWWorld::Class::get (ptr).getCreatureStats (ptr).mDynamic[mIndex].
                        getCurrent();

                    runtime.push (value);
                }
开发者ID:dhardy,项目名称:openmw,代码行数:26,代码来源:statsextensions.cpp


示例3: operator

        MWWorld::Ptr operator() (Interpreter::Runtime& runtime) const
        {
            std::string id = runtime.getStringLiteral (runtime[0].mInteger);
            runtime.pop();

            return MWBase::Environment::get().getWorld()->getPtr (id, false);
        }
开发者ID:Adrian-Revk,项目名称:openmw,代码行数:7,代码来源:ref.hpp


示例4: execute

                virtual void execute (Interpreter::Runtime& runtime)
                {
                    float param = runtime[0].mFloat;
                    runtime.pop();

                    runtime.push(std::sqrt (param));
                }
开发者ID:UIKit0,项目名称:openmw,代码行数:7,代码来源:miscextensions.cpp


示例5: execute

 virtual void execute (Interpreter::Runtime& runtime)
 {
     MWWorld::CellStore *cell = MWBase::Environment::get().getWorld()->getPlayerPtr().getCell();
     if (cell->getCell()->hasWater())
         runtime.push (cell->getWaterLevel());
     else
         runtime.push (-std::numeric_limits<float>().max());
 }
开发者ID:Chiur,项目名称:openmw,代码行数:8,代码来源:cellextensions.cpp


示例6: execute

                virtual void execute (Interpreter::Runtime &runtime)
                {
                    MWWorld::Ptr actor = R()(runtime);
                    std::string targetID = runtime.getStringLiteral (runtime[0].mInteger);
                    runtime.pop();

                    MWWorld::Ptr target = MWBase::Environment::get().getWorld()->getPtr(targetID, true);
                    MWBase::Environment::get().getMechanicsManager()->startCombat(actor, target);
                }
开发者ID:ace13,项目名称:openmw,代码行数:9,代码来源:aiextensions.cpp


示例7: execute

                virtual void execute (Interpreter::Runtime& runtime)
                {
                    MWWorld::Ptr ptr = R()(runtime);

                    std::string sound = runtime.getStringLiteral (runtime[0].mInteger);
                    runtime.pop();

                    MWBase::Environment::get().getSoundManager()->stopSound3D (ptr, sound);
                }
开发者ID:IanPAOConnor,项目名称:openmw,代码行数:9,代码来源:soundextensions.cpp


示例8: execute

                virtual void execute (Interpreter::Runtime& runtime)
                {
                    InterpreterContext& context =
                        static_cast<InterpreterContext&> (runtime.getContext());

                    MWWorld::Ptr ptr = context.getReference();

                    runtime.push (MWBase::Environment::get().getWindowManager()->readPressedButton());
                }
开发者ID:FranciscoPinto,项目名称:openmw,代码行数:9,代码来源:guiextensions.cpp


示例9: execute

                virtual void execute (Interpreter::Runtime& runtime)
                {
                    InterpreterContext& context =
                        static_cast<InterpreterContext&> (runtime.getContext());

                    MWWorld::Ptr ptr = context.getReference();

                    runtime.push (context.hasBeenActivated (ptr));
                }
开发者ID:Gohan1989,项目名称:openmw,代码行数:9,代码来源:miscextensions.cpp


示例10: execute

                virtual void execute (Interpreter::Runtime& runtime)
                {
                    std::string quest = runtime.getStringLiteral (runtime[0].mInteger);
                    runtime.pop();

                    Interpreter::Type_Integer index = runtime[0].mInteger;
                    runtime.pop();

                    MWBase::Environment::get().getJournal()->setJournalIndex (quest, index);
                }
开发者ID:0xmono,项目名称:openmw,代码行数:10,代码来源:dialogueextensions.cpp


示例11: execute

                virtual void execute (Interpreter::Runtime& runtime)
                {
                    std::string region = runtime.getStringLiteral (runtime[0].mInteger);
                    runtime.pop();

                    Interpreter::Type_Integer id = runtime[0].mInteger;
                    runtime.pop();

                    MWBase::Environment::get().getWorld()->changeWeather(region, id);
                }
开发者ID:A1-Triard,项目名称:openmw,代码行数:10,代码来源:skyextensions.cpp


示例12: execute

            virtual void execute (Interpreter::Runtime& runtime)
            {
                std::string faction1 = runtime.getStringLiteral (runtime[0].mInteger);
                runtime.pop();

                std::string faction2 = runtime.getStringLiteral (runtime[0].mInteger);
                runtime.pop();

                runtime.push(MWBase::Environment::get().getDialogueManager()
                             ->getFactionReaction(faction1, faction2));
            }
开发者ID:Lazaroth,项目名称:openmw,代码行数:11,代码来源:dialogueextensions.cpp


示例13: execute

                virtual void execute (Interpreter::Runtime& runtime)
                {
                    MWWorld::Ptr ptr = R()(runtime);

                    std::string item = runtime.getStringLiteral (runtime[0].mInteger);
                    runtime.pop();

                    MWWorld::ContainerStore& store = ptr.getClass().getContainerStore (ptr);

                    runtime.push (store.count(item));
                }
开发者ID:0xmono,项目名称:openmw,代码行数:11,代码来源:containerextensions.cpp


示例14: execute

                virtual void execute (Interpreter::Runtime& runtime)
                {
                    MWWorld::Ptr ptr = R()(runtime);

                    std::string id = runtime.getStringLiteral (runtime[0].mInteger);
                    runtime.pop();

                    // make sure a spell with this ID actually exists.
                    MWBase::Environment::get().getWorld()->getStore().spells.find (id);

                    MWWorld::Class::get (ptr).getCreatureStats (ptr).mSpells.add (id);
                }
开发者ID:hanikesn,项目名称:openmw,代码行数:12,代码来源:statsextensions.cpp


示例15: execute

                virtual void execute (Interpreter::Runtime& runtime)
                {
                    if (!MWMechanics::getPlayer().isInCell())
                    {
                        runtime.push (0);
                        return;
                    }

                    bool interior =
                        !MWMechanics::getPlayer().getCell()->getCell()->isExterior();

                    runtime.push (interior ? 1 : 0);
                }
开发者ID:devnexen,项目名称:openmw,代码行数:13,代码来源:cellextensions.cpp


示例16: execute

                virtual void execute (Interpreter::Runtime& runtime)
                {
                    if (!MWBase::Environment::get().getWorld()->getPlayerPtr().isInCell())
                    {
                        runtime.push (0);
                        return;
                    }

                    bool interior =
                        !MWBase::Environment::get().getWorld()->getPlayerPtr().getCell()->getCell()->isExterior();

                    runtime.push (interior ? 1 : 0);
                }
开发者ID:AAlderman,项目名称:openmw,代码行数:13,代码来源:cellextensions.cpp


示例17: execute

                virtual void execute (Interpreter::Runtime &runtime)
                {
                    MWWorld::Ptr actor = R()(runtime);
                    std::string targetID = runtime.getStringLiteral (runtime[0].mInteger);
                    runtime.pop();

                    MWMechanics::CreatureStats& creatureStats = actor.getClass().getCreatureStats(actor);
                    

                    creatureStats.setHostile(true);
                    creatureStats.getAiSequence().stack(
                        MWMechanics::AiCombat(MWBase::Environment::get().getWorld()->getPtr(targetID, true) ));
                }
开发者ID:Demonar24,项目名称:openmw,代码行数:13,代码来源:aiextensions.cpp


示例18: execute

                virtual void execute (Interpreter::Runtime& runtime, unsigned int arg0)
                {
                    MWWorld::Ptr ptr = R()(runtime);

                    std::string actorID = runtime.getStringLiteral (runtime[0].mInteger);
                    runtime.pop();

                    Interpreter::Type_Integer value = false; // TODO replace with implementation

                    std::cout << "AiGetDetected: " << actorID << ", " << value << std::endl;

                    runtime.push (value);
                }
开发者ID:tdunn19,项目名称:openmw,代码行数:13,代码来源:aiextensions.cpp


示例19: execute

 virtual void execute (Interpreter::Runtime& runtime)
 {
     if (!MWMechanics::getPlayer().isInCell())
     {
         runtime.push(0.f);
         return;
     }
     MWWorld::CellStore *cell = MWMechanics::getPlayer().getCell();
     if (cell->getCell()->hasWater())
         runtime.push (cell->getWaterLevel());
     else
         runtime.push (-std::numeric_limits<float>::max());
 }
开发者ID:Kafou1,项目名称:openmw,代码行数:13,代码来源:cellextensions.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ intrepid::FieldContainer类代码示例发布时间:2022-05-31
下一篇:
C++ interpreter::Interpreter类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap