09252014 Endwork

statemachine and its helper
- idle
- onhit
- ondead