actioneat.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. class ActionEatBigCB : ActionContinuousBaseCB
  2. {
  3. override void CreateActionComponent()
  4. {
  5. m_ActionData.m_ActionComponent = new CAContinuousQuantityEdible(UAQuantityConsumed.EAT_BIG, UATimeSpent.DEFAULT);
  6. }
  7. };
  8. class ActionEatBig: ActionConsume
  9. {
  10. void ActionEatBig()
  11. {
  12. m_CallbackClass = ActionEatBigCB;
  13. //m_Sound = "EatingSoft_0";
  14. m_Text = "#eat";
  15. }
  16. override void CreateConditionComponents()
  17. {
  18. m_ConditionItem = new CCINonRuined;
  19. m_ConditionTarget = new CCTSelf;
  20. }
  21. override int IsEat()
  22. {
  23. return true;
  24. }
  25. override bool HasTarget()
  26. {
  27. return false;
  28. }
  29. }
  30. //-------------- Action Eat
  31. class ActionEatCB : ActionEatBigCB
  32. {
  33. override void CreateActionComponent()
  34. {
  35. m_ActionData.m_ActionComponent = new CAContinuousQuantityEdible(UAQuantityConsumed.EAT_NORMAL, UATimeSpent.DEFAULT);
  36. }
  37. };
  38. class ActionEat: ActionEatBig
  39. {
  40. void ActionEat()
  41. {
  42. m_CallbackClass = ActionEatCB;
  43. }
  44. };
  45. //-------------- Action Eat Small
  46. class ActionEatSmallCB : ActionEatBigCB
  47. {
  48. override void CreateActionComponent()
  49. {
  50. m_ActionData.m_ActionComponent = new CAContinuousQuantityEdible(UAQuantityConsumed.EAT_SMALL, UATimeSpent.DEFAULT);
  51. }
  52. };
  53. class ActionEatSmall: ActionEatBig
  54. {
  55. void ActionEatSmall()
  56. {
  57. m_CallbackClass = ActionEatSmallCB;
  58. }
  59. };