NormalEventProc.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php
  2. namespace loyalsoft;
  3. /**
  4. * 事件类型定义
  5. * author: gwang, 2020年11月30日17:56:01
  6. */
  7. class EEventType {
  8. /**
  9. * hello world
  10. */
  11. const HelloWorld = "HelloWorld";
  12. /**
  13. * 给予道具
  14. */
  15. const AddItem = "AddItem";
  16. // /**
  17. // * 给予道具
  18. // */
  19. // const AddWeapon = "AddWeapon";
  20. //
  21. // /**
  22. // * 给予道具
  23. // */
  24. // const AddYanling = "AddYanling";
  25. /**
  26. * 完成任务步骤
  27. */
  28. const MissionStepComplete = "MissionStepComplete";
  29. /**
  30. * 任务卡完成
  31. */
  32. const TaskCardFinished = "TaskCardFinished";
  33. /**
  34. * 开启一段剧情对话
  35. */
  36. const StartPlot = "StartPlot";
  37. }
  38. /**
  39. * 系统事件处理模块
  40. * @author gwang
  41. */
  42. class NormalEventProc {
  43. //put your code here
  44. public static function OnHelloWorld($arg1, $arg2) {
  45. Resp::AddEvent(EEventType::HelloWorld, $arg1, $arg2);
  46. }
  47. /**
  48. * 包裹--获得新的道具
  49. * @param type $arg1
  50. * @param type $arg2
  51. */
  52. public static function OnBag_new_Item($arg1, $arg2) {
  53. Resp::AddEvent(EEventType::AddItem, $arg1, $arg2);
  54. }
  55. // /**
  56. // * 包裹--获得新的武器
  57. // * @param type $arg1
  58. // * @param type $arg2
  59. // */
  60. // public static function OnBag_new_Weapon($arg1, $arg2) {
  61. // Resp::AddEvent(EEventType::AddWeapon, $arg1, $arg2);
  62. // }
  63. //
  64. // /**
  65. // * 包裹--获得新的言灵
  66. // * @param type $arg1
  67. // * @param type $arg2
  68. // */
  69. // public static function OnBag_new_Yanling($arg1, $arg2) {
  70. // Resp::AddEvent(EEventType::AddYanling, $arg1, $arg2);
  71. // }
  72. /**
  73. * 任务卡-任务步骤完成
  74. * @param type $arg1
  75. * @param type $arg2
  76. */
  77. public static function OnTaskCardStep_Complete($arg1, $arg2) {
  78. Resp::AddEvent(EEventType::MissionStepComplete, $arg1, $arg2);
  79. }
  80. /**
  81. * 任务卡-完成
  82. * @param type $arg1
  83. * @param type $arg2
  84. */
  85. public static function OnTaskCard_Finish($arg1, $arg2) {
  86. Resp::AddEvent(EEventType::TaskCardFinished, $arg1, $arg2);
  87. }
  88. /**
  89. * 剧情-开启一段新对话
  90. * @param type $arg1
  91. * @param type $arg2
  92. */
  93. public static function OnPlot_startNew($arg1, $arg2) {
  94. Resp::AddEvent(EEventType::StartPlot, $arg1, $arg2);
  95. }
  96. }