Tag constructor

Tag(
  1. String tag, {
  2. Entity? entity,
  3. bool value = true,
})

A tag saves a boolean value with an entity inside the game.

Implementation

Tag(this.tag, {Entity? entity, this.value = true}) {
  this.entity = entity ?? Entity.Self();
  if (prefix != null && !tag.contains(prefix!)) tag = prefix! + tag;
}