Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
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.


Code Block
languagecpp
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