Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

In this section we creates a new behaviour module. This module is a simple follow target module.

Writing the behaviour module

First thing to do is create a class and hinerit from the base BehaviourModule class. With a constructor a desctructor and a static creator function used by atoms to create an isntance of this module.

class FollowTargetModule: public Atoms::BehaviourModule
{
	public:

		FollowTargetModule()
		{}

		virtual ~FollowTargetModule()
		{}

		static Atoms::BehaviourModule* creator(const std::string& parameter);
};

Atoms::BehaviourModule* creator(const std::string& parameter)
{
	return new FollowTargetModule();
}

Register the behaviour module

Compile the behaviour module

Use the behaviour module

  • No labels