A Behaviour is a Script that is attached to an Entity. A Behaviour is a Component thus, making possible to make new/custom Components.
Example
// Create a new Behaviour
const MyBehaviour = new Behaviour("My Behaviour");
MyBehaviour.Init = () => {
console.log("Behaviour Created");
}
MyBehaviour.Update = () => {
console.log("Behaviour Updated");
}
Extends
- Script