handstablestate.c 886 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /**@class HandStableState
  2. * @brief represents stable state (i.e. the basic states that the fsm will spend the most time in)
  3. **/
  4. class HandStableState extends HandStateBase
  5. {
  6. int m_AnimState;
  7. void HandStableState (Man player = NULL, HandStateBase parent = NULL, int anim_state = -1) { m_AnimState = anim_state; }
  8. void SyncAnimState () { }
  9. override void OnEntry (HandEventBase e)
  10. {
  11. super.OnEntry(e);
  12. SyncAnimState();
  13. //m_weapon.OnStableStateEntry();
  14. }
  15. override void OnUpdate (float dt)
  16. {
  17. super.OnUpdate(dt);
  18. SyncAnimState();
  19. }
  20. override void OnAbort (HandEventBase e)
  21. {
  22. super.OnAbort(e);
  23. }
  24. override void OnExit (HandEventBase e)
  25. {
  26. //m_weapon.ResetWeaponAnimState();
  27. super.OnExit(e);
  28. }
  29. override bool IsIdle () { return true; }
  30. int GetCurrentStateID () { return 0; }
  31. /// query for entity in hands
  32. bool HasEntityInHands () { return false; }
  33. };