From 3c0c6e69c095edf2a7aa8eec51bcb3f7c4f3995d Mon Sep 17 00:00:00 2001 From: zhaocy Date: Fri, 23 Dec 2022 10:56:20 +0800 Subject: [PATCH] update scene --- busi/linestory.go | 19 +++++++++++++++++++ busi/task.go | 35 +++++++++++++++++++++++++++++++++++ busi/worldtask.go | 17 +++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 busi/linestory.go create mode 100644 busi/task.go create mode 100644 busi/worldtask.go diff --git a/busi/linestory.go b/busi/linestory.go new file mode 100644 index 0000000..87e48f6 --- /dev/null +++ b/busi/linestory.go @@ -0,0 +1,19 @@ +package busi + +import "legu.airobot/lib" + +var _ lib.IScene = (*LinestoryScene)(nil) + +type LinestoryScene struct { + lib.Action +} + +func (ls *LinestoryScene) Info() lib.SceneInfo { + return lib.SceneInfo{ + Name: "支线剧情", + } +} + +func (ls *LinestoryScene) Run(robot lib.IRobot) error { + return nil +} diff --git a/busi/task.go b/busi/task.go new file mode 100644 index 0000000..6029363 --- /dev/null +++ b/busi/task.go @@ -0,0 +1,35 @@ +package busi + +import ( + "legu.airobot/lib" + "legu.airobot/pb" +) + +var _ lib.IScene = (*TaskScene)(nil) + +type TaskScene struct { + lib.Action +} + +func (task *TaskScene) Info() lib.SceneInfo { + return lib.SceneInfo{ + Name: "任务", + } +} + +func (task *TaskScene) Run(robot lib.IRobot) error { + + return nil +} + +func (task *TaskScene) TaskList(robot lib.IRobot, tag int32) error{ + req := &pb.TaskListReq{ + TaskTag: tag, + } + rsp := &pb.TaskListResp{} + if code := robot.SendMsg("task", "list", req, rsp); code != pb.ErrorCode_Success { + return nil + } + + return nil +} diff --git a/busi/worldtask.go b/busi/worldtask.go new file mode 100644 index 0000000..97c410a --- /dev/null +++ b/busi/worldtask.go @@ -0,0 +1,17 @@ +package busi + +import "legu.airobot/lib" + +type WorldtaskScene struct { + lib.IAction +} + +func (w *WorldtaskScene) Info() lib.SceneInfo { + return lib.SceneInfo{ + Name: "世界任务", + } +} + +func (w *WorldtaskScene) Run(robot lib.IRobot) error { + return nil +}