richardlord/Ash — pull request #18 by neilmanuell (2013-03-03 21:25:22+00:00)
Title: Suggested method EntityState.retain( ...args )

This is a suggestion to be able to explicitly declare which components to keep from the previous state.

this, for example:

``` actionscript
fsm.createState( "locked" )
.retain( Enemy, Position, PositionAdjustment, Motion, Collision, Damage, Twease, Threat )
.add( TargetLock ).withType( TargetLock )
.add( Display ).withInstance( new Display( lockedDisplay, entity.name ) )
```

allows the locked state to keep all the components declared, without verbosely having to re-define them and pass the same instance.

this doesn't affect the current way, and I can't think of any further implications that might arise.

What do you think?

BTW am really enjoying working with Ash it is a pleasure to use.