Function
onTag
(action: (obj: GameObj, tag: string) => void): KEventControllerRegister an event that runs when an object gains a tag.
param action- The function that runs when the event happens.
onTag((obj, tag) => {
debug.log(`A new tag ${tag} was added to the object ${obj.id}`);
}); returns The event controller.
since v3001.1
group Events