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


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

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


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


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