예제 #1
0
        //-------------------------------------------------------------------------
        // 客户端获取任务自动执行所需信息
        public override TaskAutoInfo clientGetTaskAutoInfo()
        {
            if (TaskData.task_state == TaskState.CanDo && TbDataTask.AcceptNpcId != 0)
            {
                TaskAutoInfo task_autoinfo = new TaskAutoInfo();
                task_autoinfo.type     = TaskAutoType.NpcDialogue;
                task_autoinfo.scene_id = TbDataTask.AcceptSceneId;
                task_autoinfo.npc_id   = TbDataTask.AcceptNpcId;
                task_autoinfo.pos      = EbVector2.Zero;
                return(task_autoinfo);
            }
            else if (TaskData.task_state == TaskState.Doing)
            {
                TaskAutoInfo task_autoinfo = new TaskAutoInfo();
                task_autoinfo.type     = TaskAutoType.NpcDialogue;
                task_autoinfo.scene_id = TbDataTask.DoSceneId;
                task_autoinfo.npc_id   = TbDataTaskDialogue.NpcId;
                task_autoinfo.pos      = EbVector2.Zero;
                return(task_autoinfo);
            }
            else if (TaskData.task_state == TaskState.Done && TbDataTask.FinishNpcId != 0)
            {
                TaskAutoInfo task_autoinfo = new TaskAutoInfo();
                task_autoinfo.type     = TaskAutoType.NpcDialogue;
                task_autoinfo.scene_id = TbDataTask.FinishSceneId;
                task_autoinfo.npc_id   = TbDataTask.FinishNpcId;
                task_autoinfo.pos      = EbVector2.Zero;
                return(task_autoinfo);
            }

            return(null);
        }
예제 #2
0
        //-------------------------------------------------------------------------
        // 客户端获取任务自动执行所需信息
        public override TaskAutoInfo clientGetTaskAutoInfo()
        {
            if (TaskData.task_state == TaskState.CanDo && TbDataTask.AcceptNpcId != 0)
            {
                TaskAutoInfo task_autoinfo = new TaskAutoInfo();
                task_autoinfo.type = TaskAutoType.NpcDialogue;
                task_autoinfo.scene_id = TbDataTask.AcceptSceneId;
                task_autoinfo.npc_id = TbDataTask.AcceptNpcId;
                task_autoinfo.pos = EbVector2.Zero;
                return task_autoinfo;
            }
            else if (TaskData.task_state == TaskState.Doing)
            {
                TaskAutoInfo task_autoinfo = new TaskAutoInfo();
                task_autoinfo.type = TaskAutoType.NpcDialogue;
                task_autoinfo.scene_id = TbDataTask.DoSceneId;
                task_autoinfo.npc_id = TbDataTaskDialogue.NpcId;
                task_autoinfo.pos = EbVector2.Zero;
                return task_autoinfo;
            }
            else if (TaskData.task_state == TaskState.Done && TbDataTask.FinishNpcId != 0)
            {
                TaskAutoInfo task_autoinfo = new TaskAutoInfo();
                task_autoinfo.type = TaskAutoType.NpcDialogue;
                task_autoinfo.scene_id = TbDataTask.FinishSceneId;
                task_autoinfo.npc_id = TbDataTask.FinishNpcId;
                task_autoinfo.pos = EbVector2.Zero;
                return task_autoinfo;
            }

            return null;
        }
예제 #3
0
 //-------------------------------------------------------------------------
 // 往黑板上写入任务自动执行信息
 public void writeBlackboardTaskAutoInfo(TaskAutoInfo task_autoinfo)
 {
     Bt.Blackboard.setData("TaskAutoInfo", task_autoinfo);
 }