amethyst / specs

Specs - Parallel ECS
https://amethyst.github.io/specs/
Apache License 2.0
2.51k stars 221 forks source link

Add WriteStorage::take #633

Open timokoesters opened 5 years ago

timokoesters commented 5 years ago

Description

It will remove the component from the entity and return it (not by reference), similar to Option::take.

Motivation

This avoids cloning the component if it will be removed soon anyway. This allows cleaner code.