class ChaoBehaviour { constructor() { Chao.Instance.registerBehaviour(this); } startBehaviour() { //override this to allow the Chao to start this behaviour } endBehaviour() { //make sure to call this so the Chao knows it can queue up another thing. Chao.Instance.behaviourCompleted(); } }