Example #1
0
    /**
     * \brief Constructor of an extension declares everything the extension contains: objects, actions, conditions and expressions.
     */
    DraggableBehaviorJsExtension()
    {
        SetExtensionInformation("DraggableBehavior",
                              _("Draggable Behavior"),
                              _("Behavior allowing to move objects with the mouse"),
                              "Florian Rival",
                              "Open source (MIT License)");

        DeclareDraggableBehaviorExtension(*this);

        GetBehaviorMetadata("DraggableBehavior::Draggable").SetIncludeFile("DraggableBehavior/draggableruntimebehavior.js");
        GetAllConditionsForBehavior("DraggableBehavior::Draggable")["DraggableBehavior::Dragged"].SetFunctionName("isDragged").SetIncludeFile("DraggableBehavior/draggableruntimebehavior.js");
        GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION();
    };
Example #2
0
    /**
     * \brief Constructor of an extension declares everything the extension contains: objects, actions, conditions and expressions.
     */
    DestroyOutsideBehaviorJsExtension()
    {
        SetExtensionInformation("DestroyOutsideBehavior",
                              _("Destroy Outside Screen Behavior"),
                              _("Behavior destroying object when they go outside the screen"),
                              "Florian Rival",
                              "Open source (MIT License)");
        DeclareDestroyOutsideBehaviorExtension(*this);

        GetBehaviorMetadata("DestroyOutsideBehavior::DestroyOutside").SetIncludeFile("DestroyOutsideBehavior/destroyoutsideruntimebehavior.js");

        GetAllConditionsForBehavior("DestroyOutsideBehavior::DestroyOutside")["DestroyOutsideBehavior::ExtraBorder"].SetFunctionName("getExtraBorder").SetIncludeFile("DestroyOutsideBehavior/destroyoutsideruntimebehavior.js");
        GetAllActionsForBehavior("DestroyOutsideBehavior::DestroyOutside")["DestroyOutsideBehavior::ExtraBorder"].SetFunctionName("setExtraBorder").SetGetter("getExtraBorder").SetIncludeFile("DestroyOutsideBehavior/destroyoutsideruntimebehavior.js");

        GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION();
    };
Example #3
0
    /**
     * \brief Constructor of an extension declares everything the extension contains: objects, actions, conditions and expressions.
     */
    TopDownMovementBehaviorJsExtension()
    {
        DeclareTopDownMovementBehaviorExtension(*this);

        GetBehaviorMetadata("TopDownMovementBehavior::TopDownMovementBehavior")
            .SetIncludeFile("TopDownMovementBehavior/topdownmovementruntimebehavior.js");

        std::map<gd::String, gd::InstructionMetadata > & autActions = GetAllActionsForBehavior("TopDownMovementBehavior::TopDownMovementBehavior");
        std::map<gd::String, gd::InstructionMetadata > & autConditions = GetAllConditionsForBehavior("TopDownMovementBehavior::TopDownMovementBehavior");
        std::map<gd::String, gd::ExpressionMetadata > & autExpressions = GetAllExpressionsForBehavior("TopDownMovementBehavior::TopDownMovementBehavior");

        autConditions["TopDownMovementBehavior::IsMoving"].SetFunctionName("isMoving");

        autActions["TopDownMovementBehavior::Acceleration"].SetFunctionName("setAcceleration").SetGetter("getAcceleration");
        autConditions["TopDownMovementBehavior::Acceleration"].SetFunctionName("getAcceleration");
        autActions["TopDownMovementBehavior::Deceleration"].SetFunctionName("setDeceleration").SetGetter("getDeceleration");
        autConditions["TopDownMovementBehavior::Deceleration"].SetFunctionName("getDeceleration");
        autActions["TopDownMovementBehavior::MaxSpeed"].SetFunctionName("setMaxSpeed").SetGetter("getMaxSpeed");
        autConditions["TopDownMovementBehavior::MaxSpeed"].SetFunctionName("getMaxSpeed");
        autConditions["TopDownMovementBehavior::Speed"].SetFunctionName("getSpeed");
        autActions["TopDownMovementBehavior::AngularMaxSpeed"].SetFunctionName("setAngularMaxSpeed").SetGetter("getAngularMaxSpeed");
        autConditions["TopDownMovementBehavior::AngularMaxSpeed"].SetFunctionName("getAngularMaxSpeed");
        autActions["TopDownMovementBehavior::AngleOffset"].SetFunctionName("setAngleOffset").SetGetter("getAngleOffset");
        autConditions["TopDownMovementBehavior::AngleOffset"].SetFunctionName("getAngleOffset");

        autActions["TopDownMovementBehavior::AllowDiagonals"].SetFunctionName("allowDiagonals");
        autConditions["TopDownMovementBehavior::DiagonalsAllowed"].SetFunctionName("diagonalsAllowed");
        autActions["TopDownMovementBehavior::RotateObject"].SetFunctionName("setRotateObject");
        autConditions["TopDownMovementBehavior::ObjectRotated"].SetFunctionName("isObjectRotated");

        autActions["TopDownMovementBehavior::SimulateLeftKey"].SetFunctionName("simulateLeftKey");
        autActions["TopDownMovementBehavior::SimulateRightKey"].SetFunctionName("simulateRightKey");
        autActions["TopDownMovementBehavior::SimulateUpKey"].SetFunctionName("simulateUpKey");
        autActions["TopDownMovementBehavior::SimulateDownKey"].SetFunctionName("simulateDownKey");
        autActions["TopDownMovementBehavior::SimulateControl"].SetFunctionName("simulateControl");
        autActions["TopDownMovementBehavior::IgnoreDefaultControls"].SetFunctionName("ignoreDefaultControls");

        autExpressions["Acceleration"].SetFunctionName("getAcceleration");
        autExpressions["Deceleration"].SetFunctionName("getDeceleration");
        autExpressions["MaxSpeed"].SetFunctionName("getMaxSpeed");
        autExpressions["Speed"].SetFunctionName("getSpeed");
        autExpressions["AngularMaxSpeed"].SetFunctionName("getAngularMaxSpeed");
        autExpressions["AngleOffset"].SetFunctionName("getAngleOffset");

        GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION();
    };
Example #4
0
    /**
     * \brief Constructor of an extension declares everything the extension contains: objects, actions, conditions and expressions.
     */
    PlatformBehaviorJsExtension()
    {
        SetExtensionInformation("PlatformBehavior",
                              _("Platform Behavior"),
                              _("Allows to use controllable objects which can run and jump on platforms."),
                              "Florian Rival",
                              "Open source (MIT License)");
        DeclarePlatformBehaviorExtension(*this);

        GetBehaviorMetadata("PlatformBehavior::PlatformBehavior")
            .SetIncludeFile("PlatformBehavior/platformruntimebehavior.js")
            .AddIncludeFile("PlatformBehavior/platformerobjectruntimebehavior.js");

        GetBehaviorMetadata("PlatformBehavior::PlatformerObjectBehavior")
            .SetIncludeFile("PlatformBehavior/platformruntimebehavior.js")
            .AddIncludeFile("PlatformBehavior/platformerobjectruntimebehavior.js");

        {

            std::map<gd::String, gd::InstructionMetadata > & autActions = GetAllActionsForBehavior("PlatformBehavior::PlatformerObjectBehavior");
            std::map<gd::String, gd::InstructionMetadata > & autConditions = GetAllConditionsForBehavior("PlatformBehavior::PlatformerObjectBehavior");
            std::map<gd::String, gd::ExpressionMetadata > & autExpressions = GetAllExpressionsForBehavior("PlatformBehavior::PlatformerObjectBehavior");

            autConditions["PlatformBehavior::IsMoving"].SetFunctionName("isMoving");
            autConditions["PlatformBehavior::IsOnFloor"].SetFunctionName("isOnFloor");
            autConditions["PlatformBehavior::IsOnLadder"].SetFunctionName("isOnLadder");
            autConditions["PlatformBehavior::IsJumping"].SetFunctionName("isJumping");
            autConditions["PlatformBehavior::IsFalling"].SetFunctionName("isFalling");
            autConditions["PlatformBehavior::IsGrabbingPlatform"].SetFunctionName("isGrabbingPlatform");

            autConditions["PlatformBehavior::Gravity"].SetFunctionName("getGravity");
            autActions["PlatformBehavior::Gravity"].SetFunctionName("setGravity").SetGetter("getGravity");
            autExpressions["Gravity"].SetFunctionName("getGravity");
            autConditions["PlatformBehavior::MaxFallingSpeed"].SetFunctionName("getMaxFallingSpeed");
            autActions["PlatformBehavior::MaxFallingSpeed"].SetFunctionName("setMaxFallingSpeed").SetGetter("getMaxFallingSpeed");
            autExpressions["MaxFallingSpeed"].SetFunctionName("getMaxFallingSpeed");
            autConditions["PlatformBehavior::Acceleration"].SetFunctionName("getAcceleration");
            autActions["PlatformBehavior::Acceleration"].SetFunctionName("setAcceleration").SetGetter("getAcceleration");
            autExpressions["Acceleration"].SetFunctionName("getAcceleration");
            autConditions["PlatformBehavior::Deceleration"].SetFunctionName("getDeceleration");
            autActions["PlatformBehavior::Deceleration"].SetFunctionName("setDeceleration").SetGetter("getDeceleration");
            autExpressions["Deceleration"].SetFunctionName("getDeceleration");
            autConditions["PlatformBehavior::MaxSpeed"].SetFunctionName("getMaxSpeed");
            autActions["PlatformBehavior::MaxSpeed"].SetFunctionName("setMaxSpeed").SetGetter("getMaxSpeed");
            autExpressions["MaxSpeed"].SetFunctionName("getMaxSpeed");
            autConditions["PlatformBehavior::JumpSpeed"].SetFunctionName("getJumpSpeed");
            autActions["PlatformBehavior::JumpSpeed"].SetFunctionName("setJumpSpeed").SetGetter("getJumpSpeed");
            autExpressions["JumpSpeed"].SetFunctionName("getJumpSpeed");

            autActions["PlatformBehavior::SetCanJump"].SetFunctionName("setCanJump");
            autActions["PlatformBehavior::SimulateLeftKey"].SetFunctionName("simulateLeftKey");
            autActions["PlatformBehavior::SimulateRightKey"].SetFunctionName("simulateRightKey");
            autActions["PlatformBehavior::SimulateUpKey"].SetFunctionName("simulateUpKey");
            autActions["PlatformBehavior::SimulateDownKey"].SetFunctionName("simulateDownKey");
            autActions["PlatformBehavior::SimulateLadderKey"].SetFunctionName("simulateLadderKey");
            autActions["PlatformBehavior::SimulateJumpKey"].SetFunctionName("simulateJumpKey");
            autActions["PlatformBehavior::SimulateReleaseKey"].SetFunctionName("simulateReleaseKey");
            autActions["PlatformBehavior::SimulateControl"].SetFunctionName("simulateControl");
            autActions["PlatformBehavior::IgnoreDefaultControls"].SetFunctionName("ignoreDefaultControls");
        }
        {
            std::map<gd::String, gd::InstructionMetadata > & autActions = GetAllActionsForBehavior("PlatformBehavior::PlatformBehavior");

            autActions["PlatformBehavior::ChangePlatformType"].SetFunctionName("changePlatformType");
        }
        GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION();
    };
Example #5
0
  /**
   * \brief Constructor of an extension declares everything the extension
   * contains: objects, actions, conditions and expressions.
   */
  PhysicsBehaviorJsExtension() {
    DeclarePhysicsBehaviorExtension(*this);

    GetBehaviorMetadata("PhysicsBehavior::PhysicsBehavior")
        .SetIncludeFile("Extensions/PhysicsBehavior/box2djs/box2d.js")
        .AddIncludeFile("Extensions/PhysicsBehavior/physicsruntimebehavior.js");

    std::map<gd::String, gd::InstructionMetadata>& autActions =
        GetAllActionsForBehavior("PhysicsBehavior::PhysicsBehavior");
    std::map<gd::String, gd::InstructionMetadata>& autConditions =
        GetAllConditionsForBehavior("PhysicsBehavior::PhysicsBehavior");
    std::map<gd::String, gd::ExpressionMetadata>& autExpressions =
        GetAllExpressionsForBehavior("PhysicsBehavior::PhysicsBehavior");

    autActions["PhysicsBehavior::SetStatic"].SetFunctionName("setStatic");
    autActions["PhysicsBehavior::SetDynamic"].SetFunctionName("setDynamic");
    autConditions["PhysicsBehavior::SetDynamic"].SetFunctionName("isDynamic");
    autActions["PhysicsBehavior::SetFixedRotation"].SetFunctionName(
        "setFixedRotation");
    autActions["PhysicsBehavior::SetFreeRotation"].SetFunctionName(
        "setFreeRotation");
    autActions["PhysicsBehavior::AddRevoluteJoint"].SetFunctionName(
        "addRevoluteJoint");
    autActions["PhysicsBehavior::AddRevoluteJointBetweenObjects"]
        .SetFunctionName("addRevoluteJointBetweenObjects");
    autActions["PhysicsBehavior::ActAddGearJointBetweenObjects"]
        .SetFunctionName("addGearJointBetweenObjects");
    autConditions["PhysicsBehavior::IsFixedRotation"].SetFunctionName(
        "isFixedRotation");
    autActions["PhysicsBehavior::SetAsBullet"].SetFunctionName("setAsBullet");
    autActions["PhysicsBehavior::DontSetAsBullet"].SetFunctionName(
        "dontSetAsBullet");
    autConditions["PhysicsBehavior::IsBullet"].SetFunctionName("isBullet");
    autActions["PhysicsBehavior::ApplyImpulse"].SetFunctionName("applyImpulse");
    autActions["PhysicsBehavior::ApplyImpulseUsingPolarCoordinates"]
        .SetFunctionName("applyImpulseUsingPolarCoordinates");
    autActions["PhysicsBehavior::ApplyImpulseTowardPosition"].SetFunctionName(
        "applyImpulseTowardPosition");
    autActions["PhysicsBehavior::ApplyForce"].SetFunctionName("applyForce");
    autActions["PhysicsBehavior::ApplyForceUsingPolarCoordinates"]
        .SetFunctionName("applyForceUsingPolarCoordinates");
    autActions["PhysicsBehavior::ApplyForceTowardPosition"].SetFunctionName(
        "applyForceTowardPosition");
    autActions["PhysicsBehavior::ApplyTorque"].SetFunctionName("applyTorque");
    autActions["PhysicsBehavior::SetLinearVelocity"].SetFunctionName(
        "setLinearVelocity");
    autConditions["PhysicsBehavior::LinearVelocityX"].SetFunctionName(
        "getLinearVelocityX");
    autConditions["PhysicsBehavior::LinearVelocityY"].SetFunctionName(
        "getLinearVelocityY");
    autConditions["PhysicsBehavior::LinearVelocity"].SetFunctionName(
        "getLinearVelocity");
    autActions["PhysicsBehavior::SetAngularVelocity"].SetFunctionName(
        "setAngularVelocity");
    autConditions["PhysicsBehavior::AngularVelocity"].SetFunctionName(
        "getAngularVelocity");
    autConditions["PhysicsBehavior::CollisionWith"].SetFunctionName(
        "collisionWith");
    autConditions["PhysicsBehavior::LinearDamping"].SetFunctionName(
        "getLinearDamping");
    autActions["PhysicsBehavior::SetLinearDamping"].SetFunctionName(
        "setLinearDamping");
    autConditions["PhysicsBehavior::AngularDamping"].SetFunctionName(
        "getAngularDamping");
    autActions["PhysicsBehavior::SetAngularDamping"].SetFunctionName(
        "setAngularDamping");
    autActions["PhysicsBehavior::SetGravity"].SetFunctionName("setGravity");
    autExpressions["LinearVelocity"].SetFunctionName("getLinearVelocity");
    autExpressions["LinearVelocityX"].SetFunctionName("getLinearVelocityX");
    autExpressions["LinearVelocityY"].SetFunctionName("getLinearVelocityY");
    autExpressions["AngularVelocity"].SetFunctionName("getAngularVelocity");
    autExpressions["LinearDamping"].SetFunctionName("getLinearDamping");
    autExpressions["AngularDamping"].SetFunctionName("getAngularDamping");

    /*
        aut.AddAction("SetPolygonScaleX",
                       _("Change collision polygon X scale"),
                       _("Change the X scale of the polygon. Use a value greater
       than 1 to enlarge the polygon, less than 1 to reduce it."),
                       _("Change collision polygon of _PARAM0_ X scale to
       _PARAM2_"),
                       _("Collision polygon"),
                       "res/physics24.png",
                       "res/physics16.png")
            .AddParameter("object", _("Object"))
            .AddParameter("behavior", _("Behavior"), "PhysicsBehavior")
            .AddParameter("expression", _("Scale"))
            .AddCodeOnlyParameter("currentScene", "")
            .SetFunctionName("SetPolygonScaleX").SetIncludeFile("PhysicsBehavior/PhysicsBehavior.h");

        aut.AddAction("SetPolygonScaleY",
                       _("Change collision polygon Y scale"),
                       _("Change the Y scale of the polygon. Use a value greater
       than 1 to enlarge the polygon, less than 1 to reduce it."),
                       _("Change collision polygon of _PARAM0_ Y scale to
       _PARAM2_"),
                       _("Collision polygon"),
                       "res/physics24.png",
                       "res/physics16.png")
            .AddParameter("object", _("Object"))
            .AddParameter("behavior", _("Behavior"), "PhysicsBehavior")
            .AddParameter("expression", _("Scale"))
            .AddCodeOnlyParameter("currentScene", "")
            .SetFunctionName("SetPolygonScaleY").SetIncludeFile("PhysicsBehavior/PhysicsBehavior.h");

        aut.AddCondition("GetPolygonScaleX",
                       _("Collision polygon X scale"),
                       _("Test the value of the collision polygon X scale."),
                       _("Collision polygon of _PARAM0_ X scale is
       _PARAM2__PARAM3_"),
                       _("Collision polygon"),
                       "res/physics24.png",
                       "res/physics16.png")
            .AddParameter("object", _("Object"))
            .AddParameter("behavior", _("Behavior"), "PhysicsBehavior")
            .AddParameter("relationalOperator", _("Comparison sign"))
            .AddParameter("expression", _("Value to test"))
            .AddCodeOnlyParameter("currentScene", "")
            .SetFunctionName("GetPolygonScaleX").SetManipulatedType("number").SetIncludeFile("PhysicsBehavior/PhysicsBehavior.h");

        aut.AddCondition("GetPolygonScaleY",
                       _("Collision polygon Y scale"),
                       _("Test the value of the collision polygon Y scale."),
                       _("Collision polygon of _PARAM0_ Y scale is
       _PARAM2__PARAM3_"),
                       _("Collision polygon"),
                       "res/physics24.png",
                       "res/physics16.png")
            .AddParameter("object", _("Object"))
            .AddParameter("behavior", _("Behavior"), "PhysicsBehavior")
            .AddParameter("relationalOperator", _("Comparison sign"))
            .AddParameter("expression", _("Value to test"))
            .AddCodeOnlyParameter("currentScene", "")
            .SetFunctionName("GetPolygonScaleY").SetManipulatedType("number").SetIncludeFile("PhysicsBehavior/PhysicsBehavior.h");

        aut.AddExpression("PolygonScaleX", _("Collision polygon X scale"),
       _("Collision polygon X scale"), _("Collision polygon"),
       "res/physics16.png") .AddParameter("object", _("Object"))
            .AddParameter("behavior", _("Behavior"), "PhysicsBehavior")
            .AddCodeOnlyParameter("currentScene", "")
            .SetFunctionName("GetPolygonScaleX").SetIncludeFile("PhysicsBehavior/PhysicsBehavior.h");

        aut.AddExpression("PolygonScaleY", _("Collision polygon Y scale"),
       _("Collision polygon Y scale"), _("Collision polygon"),
       "res/physics16.png") .AddParameter("object", _("Object"))
            .AddParameter("behavior", _("Behavior"), "PhysicsBehavior")
            .AddCodeOnlyParameter("currentScene", "")
            .SetFunctionName("GetPolygonScaleY").SetIncludeFile("PhysicsBehavior/PhysicsBehavior.h");
*/

    StripUnimplementedInstructionsAndExpressions();
    GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION();
  };
Example #6
0
    /**
     * \brief Constructor of an extension declares everything the extension contains: objects, actions, conditions and expressions.
     */
    JsExtension()
    {
        SetExtensionInformation("PathfindingBehavior",
                              _("Pathfinding behavior"),
                              _("Compute paths for objects avoiding obstacles."),
                              "Florian Rival",
                              "Open source (MIT License)");
        CloneExtension("GDevelop C++ platform", "PathfindingBehavior");

        GetBehaviorMetadata("PathfindingBehavior::PathfindingBehavior")
            .SetIncludeFile("PathfindingBehavior/pathfindingruntimebehavior.js")
            .AddIncludeFile("PathfindingBehavior/pathfindingobstacleruntimebehavior.js");

        {

            std::map<gd::String, gd::InstructionMetadata > & autActions = GetAllActionsForBehavior("PathfindingBehavior::PathfindingBehavior");
            std::map<gd::String, gd::InstructionMetadata > & autConditions = GetAllConditionsForBehavior("PathfindingBehavior::PathfindingBehavior");
            std::map<gd::String, gd::ExpressionMetadata > & autExpressions = GetAllExpressionsForBehavior("PathfindingBehavior::PathfindingBehavior");

            autConditions["PathfindingBehavior::PathFound"].SetFunctionName("pathFound");
            autActions["PathfindingBehavior::SetDestination"].SetFunctionName("moveTo");
            autConditions["PathfindingBehavior::DestinationReached"].SetFunctionName("destinationReached");
            autActions["PathfindingBehavior::CellWidth"].SetFunctionName("setCellWidth").SetGetter("getCellWidth");
            autConditions["PathfindingBehavior::CellWidth"].SetFunctionName("getCellWidth");
            autActions["PathfindingBehavior::CellHeight"].SetFunctionName("setCellHeight").SetGetter("getCellHeight");
            autConditions["PathfindingBehavior::CellHeight"].SetFunctionName("getCellHeight");
            autActions["PathfindingBehavior::Acceleration"].SetFunctionName("setAcceleration").SetGetter("getAcceleration");
            autConditions["PathfindingBehavior::Acceleration"].SetFunctionName("getAcceleration");
            autActions["PathfindingBehavior::MaxSpeed"].SetFunctionName("setMaxSpeed").SetGetter("getMaxSpeed");
            autConditions["PathfindingBehavior::MaxSpeed"].SetFunctionName("getMaxSpeed");
            autActions["PathfindingBehavior::Speed"].SetFunctionName("setSpeed").SetGetter("getSpeed");
            autConditions["PathfindingBehavior::Speed"].SetFunctionName("getSpeed");
            autActions["PathfindingBehavior::AngularMaxSpeed"].SetFunctionName("setAngularMaxSpeed").SetGetter("getAngularMaxSpeed");
            autConditions["PathfindingBehavior::AngularMaxSpeed"].SetFunctionName("getAngularMaxSpeed");
            autActions["PathfindingBehavior::AngleOffset"].SetFunctionName("setAngleOffset").SetGetter("getAngleOffset");
            autConditions["PathfindingBehavior::AngleOffset"].SetFunctionName("getAngleOffset");
            autActions["PathfindingBehavior::ExtraBorder"].SetFunctionName("setExtraBorder").SetGetter("getExtraBorder");
            autConditions["PathfindingBehavior::ExtraBorder"].SetFunctionName("getExtraBorder");

            autActions["PathfindingBehavior::AllowDiagonals"].SetFunctionName("allowDiagonals");
            autConditions["PathfindingBehavior::DiagonalsAllowed"].SetFunctionName("diagonalsAllowed");
            autActions["PathfindingBehavior::RotateObject"].SetFunctionName("setRotateObject");
            autConditions["PathfindingBehavior::ObjectRotated"].SetFunctionName("isObjectRotated");

            autExpressions["GetNodeX"].SetFunctionName("getNodeX");
            autExpressions["GetNodeY"].SetFunctionName("getNodeY");
            autExpressions["NextNodeIndex"].SetFunctionName("getNextNodeIndex");
            autExpressions["NodeCount"].SetFunctionName("getNodeCount");
            autExpressions["NextNodeX"].SetFunctionName("getNextNodeX");
            autExpressions["NextNodeY"].SetFunctionName("getNextNodeY");
            autExpressions["LastNodeX"].SetFunctionName("getLastNodeX");
            autExpressions["LastNodeY"].SetFunctionName("getLastNodeY");
            autExpressions["DestinationX"].SetFunctionName("getDestinationX");
            autExpressions["DestinationY"].SetFunctionName("getDestinationY");

            autExpressions["Acceleration"].SetFunctionName("getAcceleration");
            autExpressions["MaxSpeed"].SetFunctionName("getMaxSpeed");
            autExpressions["Speed"].SetFunctionName("getSpeed");
            autExpressions["AngularMaxSpeed"].SetFunctionName("getAngularMaxSpeed");
            autExpressions["AngleOffset"].SetFunctionName("getAngleOffset");
            autExpressions["ExtraBorder"].SetFunctionName("getExtraBorder");
            autExpressions["CellWidth"].SetFunctionName("getCellWidth");
            autExpressions["CellHeight"].SetFunctionName("getCellHeight");
        }

        GetBehaviorMetadata("PathfindingBehavior::PathfindingObstacleBehavior")
            .SetIncludeFile("PathfindingBehavior/pathfindingruntimebehavior.js")
            .AddIncludeFile("PathfindingBehavior/pathfindingobstacleruntimebehavior.js");

        {
            std::map<gd::String, gd::InstructionMetadata > & autActions = GetAllActionsForBehavior("PathfindingBehavior::PathfindingObstacleBehavior");
            std::map<gd::String, gd::InstructionMetadata > & autConditions = GetAllConditionsForBehavior("PathfindingBehavior::PathfindingObstacleBehavior");
            std::map<gd::String, gd::ExpressionMetadata > & autExpressions = GetAllExpressionsForBehavior("PathfindingBehavior::PathfindingObstacleBehavior");

            autActions["PathfindingObstacleBehavior::Cost"].SetFunctionName("setCost").SetGetter("getCost");
            autConditions["PathfindingObstacleBehavior::Cost"].SetFunctionName("getCost");
            autActions["PathfindingObstacleBehavior::SetImpassable"].SetFunctionName("setImpassable");
            autConditions["PathfindingObstacleBehavior::IsImpassable"].SetFunctionName("isImpassable");

            autExpressions["Cost"].SetFunctionName("getCost");
        }

        StripUnimplementedInstructionsAndExpressions();
    };