ActionObjects & Actions

Learn how to use the ActionObjects and Actions

The Mechanism

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Create an Action

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

  • ObjectAction
  • LayerAction
  • SpriteAction
  • PhysicAction
class JumpAction : public nero::PhysicAction
{
    public:
        float force = 1000.f;
        virtual void call(PhysicObject::Ptr object, sf::Time time_step);
};
void JumpAction::call(PhysicObject::Ptr object, sf::Time time_step)
{
    object->applyForce(sf::Vector2f(0, force), object->getWorldCenter(), true);
}

Create An ActionObject

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

 

  • SimpleActionObject
  • LayerActionObject
  • PhysicActionObject
 

Create actionobject by instanciation

create action object by inheritence

add and remove actions

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Use your ActionObject and Action

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

Nero Games will use the information you provide on this form to be in touch with you and to provide updates and marketing.