mutate<T extends Component> method

Option<T> mutate<T extends Component>(
  1. T update(
    1. T current
    )
)

Replaces the component of type T using update.

Implementation

Option<T> mutate<T extends Component>(T Function(T current) update) =>
    world.mutate<T>(this, update);