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


C++ Runtime::getContext方法代码示例

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


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

示例1: execute

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

                    context.getInputManager().setGuiMode(mDialogue);
                }
开发者ID:artorius,项目名称:openmw,代码行数:7,代码来源:guiextensions.cpp

示例2: operator

        MWWorld::Ptr operator() (Interpreter::Runtime& runtime) const
        {
            MWScript::InterpreterContext& context
                = static_cast<MWScript::InterpreterContext&> (runtime.getContext());

            return context.getReference();
        }
开发者ID:AlfredBroda,项目名称:openmw,代码行数:7,代码来源:ref.hpp

示例3: execute

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

                    context.getWorld().toggleCollisionMode();
                }
开发者ID:StableOrbital,项目名称:openmw,代码行数:7,代码来源:controlextensions.cpp

示例4: 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

示例5: execute

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

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

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

示例6: 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

示例7: execute

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

                    bool enabled = MWBase::Environment::get().getMechanicsManager()->toggleAI();

                    context.report (enabled ? "AI -> On" : "AI -> Off");
                }
开发者ID:Allxere,项目名称:openmw,代码行数:9,代码来源:aiextensions.cpp

示例8: execute

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

                    bool enabled = MWBase::Environment::get().getWorld()->toggleCollisionMode();

                    context.report (enabled ? "Collision -> On" : "Collision -> Off");
                }
开发者ID:DavidBairamian,项目名称:openmw,代码行数:9,代码来源:controlextensions.cpp

示例9: execute

            virtual void execute(Interpreter::Runtime &runtime)
            {
                bool state = MWBase::Environment::get().getWindowManager()->toggleGui();
                runtime.getContext().report(state ? "GUI -> On" : "GUI -> Off");

                if (!state)
                {
                    while (MWBase::Environment::get().getWindowManager()->getMode() != MWGui::GM_None) // don't use isGuiMode, or we get an infinite loop for modal message boxes!
                        MWBase::Environment::get().getWindowManager()->popGuiMode();
                }
            }
开发者ID:Digmaster,项目名称:openmwproj,代码行数:11,代码来源:guiextensions.cpp

示例10: execute

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

                    bool enabled =
                        MWBase::Environment::get().getWorld()->toggleRenderMode (MWWorld::World::Render_CollisionDebug);

                    context.report (enabled ?
                        "Collision Mesh Rendering -> On" : "Collision Mesh Rendering -> Off");
                }
开发者ID:SlavaHill,项目名称:openmw,代码行数:11,代码来源:miscextensions.cpp

示例11: execute

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

                MWBase::World *world =
                    MWBase::Environment::get().getWorld();

                if (world->toggleVanityMode(sActivate)) {
                    context.report(sActivate ? "Vanity Mode -> On" : "Vanity Mode -> Off");
                    sActivate = !sActivate;
                } else {
                    context.report("Vanity Mode -> No");
                }
            }
开发者ID:UIKit0,项目名称:openmw,代码行数:15,代码来源:miscextensions.cpp

示例12: execute

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

                    if (!ptr.getRefData().isEnabled())
                        return;

                    if (!ptr.getClass().isActor())
                    {
                        const std::string error = "Warning: \"forcegreeting\" command works only for actors.";
                        runtime.getContext().report(error);
                        Log(Debug::Warning) << error;
                        return;
                    }

                    MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Dialogue, ptr);
                }
开发者ID:Allofich,项目名称:openmw,代码行数:17,代码来源:dialogueextensions.cpp

示例13: execute

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

                    MWScript::InterpreterContext& context
                        = static_cast<MWScript::InterpreterContext&> (runtime.getContext());

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

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

                    MWBase::Environment::get().getSoundManager()->say (ptr, file);

                    if (MWBase::Environment::get().getWindowManager ()->getSubtitlesEnabled())
                        context.messageBox (text);
                }
开发者ID:IanPAOConnor,项目名称:openmw,代码行数:18,代码来源:soundextensions.cpp

示例14: execute

 virtual void execute (Interpreter::Runtime& runtime)
 {
     runtime.push (static_cast<InterpreterContext&> (
         runtime.getContext()).hasBeenActivated());
 } 
开发者ID:OndraK,项目名称:openmw,代码行数:5,代码来源:miscextensions.cpp

示例15: execute

                virtual void execute (Interpreter::Runtime& runtime)
                {
                    bool enabled = MWBase::Environment::get().getMechanicsManager()->toggleAI();

                    runtime.getContext().report (enabled ? "AI -> On" : "AI -> Off");
                }
开发者ID:ace13,项目名称:openmw,代码行数:6,代码来源:aiextensions.cpp


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