123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <?php
- namespace loyalsoft;
- /**
- * 事件类型定义
- * author: gwang, 2020年11月30日17:56:01
- */
- class EEventType {
- /**
- * hello world
- */
- const HelloWorld = "HelloWorld";
- /**
- * 给予道具
- */
- const AddItem = "AddItem";
- /**
- * 移除道具
- */
- const RemoveItem = "RemoveItem";
- /**
- * 给予任务
- */
- const AddTaskItem = "AddTaskItem";
- /**
- * 移除任务
- */
- const RemoveTaskItem = "RemoveTaskItem";
- /**
- * 完成任务步骤
- */
- const MissionStepComplete = "MissionStepComplete";
- /**
- * 任务卡完成
- */
- const TaskCardFinished = "TaskCardFinished";
- /**
- * 开启一段剧情对话
- */
- const StartPlot = "StartPlot";
- /**
- * 开启npc对话
- */
- const NpcDialog = "NpcDialog";
- }
- /**
- * 系统事件处理模块
- * @author gwang
- */
- class NormalEventProc {
- //put your code here
- public static function OnHelloWorld($arg1, $arg2) {
- Resp::AddEvent(EEventType::HelloWorld, $arg1, $arg2);
- }
- /**
- * 包裹--获得新的道具
- * @param type $arg1
- * @param type $arg2
- */
- public static function OnBag_new_Item($arg1, $arg2) {
- Resp::AddEvent(EEventType::AddItem, $arg1, $arg2);
- }
- /**
- * 包裹--移除道具
- * @param type $arg1
- * @param type $arg2
- */
- public static function OnBag_Remove_Item($arg1, $arg2) {
- Resp::AddEvent(EEventType::RemoveItem, $arg1, $arg2);
- }
- /**
- * 任务卡包裹--获得新的任务卡
- * @param type $arg1
- * @param type $arg2
- */
- public static function OnTaskBag_new_Card($arg1, $arg2) {
- Resp::AddEvent(EEventType::AddTaskItem, $arg1, $arg2);
- }
- //
- /**
- * 任务卡包裹--移除任务卡
- * @param type $arg1
- * @param type $arg2
- */
- public static function OnTaskBag_remove_Card($arg1, $arg2) {
- Resp::AddEvent(EEventType::AddYanling, $arg1, $arg2);
- }
- /**
- * 任务卡-任务步骤完成
- * @param type $arg1
- * @param type $arg2
- */
- public static function OnTaskCardStep_Complete($arg1, $arg2) {
- Resp::AddEvent(EEventType::MissionStepComplete, $arg1, $arg2);
- }
- /**
- * 任务卡-完成
- * @param type $arg1
- * @param type $arg2
- */
- public static function OnTaskCard_Finish($arg1, $arg2) {
- Resp::AddEvent(EEventType::TaskCardFinished, $arg1, $arg2);
- }
- /**
- * 剧情-开启一段新对话
- * @param type $arg1
- * @param type $arg2
- */
- public static function OnPlot_startNew($arg1, $arg2) {
- Resp::AddEvent(EEventType::StartPlot, $arg1, $arg2);
- }
- /**
- * 剧情-开启一段NPC对话
- * @param type $arg1
- * @param type $arg2
- */
- public static function OnNpcDialog_startNew($arg1, $arg2) {
- Resp::AddEvent(EEventType::NpcDialog, $arg1, $arg2);
- }
- }
|