Exemple #1
0
    // Update is called once per frame
    void Update()
    {
        switch (TaskStepManagaer.Instance.GetCurTaskID())
        {
        case 1001:
        {
            _taskStartTime = TimeHelper.GetCurrentRealTimestamp();
            _audioWaitTime = npc.GetCurAudioLength(1001);

            npc.PlaySound(1001);
        }
        break;

        case 1002:
        {
            npc.PlaySound(1002);
        }
        break;

        case 1003:
        {
            npc.PlaySound(1003);
        }
        break;

        //case 1001:
        //    {
        //        npc.PlaySound(TaskStepManagaer.Instance.GetCurTaskID());
        //    }
        //    break;
        //case 1001:
        //    {
        //        npc.PlaySound(TaskStepManagaer.Instance.GetCurTaskID());
        //    }
        //    break;
        //case 1001:
        //    {
        //        npc.PlaySound(TaskStepManagaer.Instance.GetCurTaskID());
        //    }
        //    break;
        //case 1001:
        //    {
        //        npc.PlaySound(TaskStepManagaer.Instance.GetCurTaskID());
        //    }
        //    break;
        //case 1001:
        //    {
        //        npc.PlaySound(TaskStepManagaer.Instance.GetCurTaskID());
        //    }
        //    break;
        //case 1001:
        //    {
        //        npc.PlaySound(TaskStepManagaer.Instance.GetCurTaskID());
        //    }
        //    break;
        //case 1001:
        //    {
        //        npc.PlaySound(TaskStepManagaer.Instance.GetCurTaskID());
        //    }
        //    break;
        //case 1001:
        //    {
        //        npc.PlaySound(TaskStepManagaer.Instance.GetCurTaskID());
        //    }
        //    break;
        //case 1001:
        //    {
        //        npc.PlaySound(TaskStepManagaer.Instance.GetCurTaskID());
        //    }
        //    break;
        //case 1001:
        //    {
        //        npc.PlaySound(TaskStepManagaer.Instance.GetCurTaskID());
        //    }
        //    break;
        //case 1001:
        //    {
        //        npc.PlaySound(TaskStepManagaer.Instance.GetCurTaskID());
        //    }
        //    break;
        //case 1001:
        //    {
        //        npc.PlaySound(TaskStepManagaer.Instance.GetCurTaskID());
        //    }
        //    break;
        //case 1001:
        //    {
        //        npc.PlaySound(TaskStepManagaer.Instance.GetCurTaskID());
        //    }
        //    break;
        default:
            break;
        }
    }
Exemple #2
0
    //public bool IsHasCurTask()
    //{

    //}

    private void EnterTask(NPC_StoryConfig melissaTask)
    {
        Debug.Log("Melissa--当前剧情" + melissaTask.taskId + "---" + melissaTask.description);
        //_melissaAudioController.PlaySound(melissaTask.audioId);
        _curMelissaTask = melissaTask;
        _melissaController.SetTargetPoint(melissaTask.targetPos);
        _melissaAudioController.PlaySound(melissaTask.audioId);

        _taskStartTime = TimeHelper.GetCurrentRealTimestamp();
        if (melissaTask.audioId > 0)
        {
            _audioWaitTime = _melissaAudioController.GetCurAudioLength(melissaTask.audioId);
        }
        else
        {
            _audioWaitTime = 0f;
        }

        switch (melissaTaskProcess.curTaskID)
        {
        case 1000:      //出现
            //_melissaController.SetCanSkipStep(true); //test
            _melissaController.SetState(MelissaController.STATE.RUN);
            break;

        case 1001:                //妈妈
            _isStartTimer = true; //可以开始计时
            //FinishCurTaskImmediately();//test
            break;

        case 1002:                //妈妈,门口有人
            _melissaController.SetState(MelissaController.STATE.TALK);
            _isStartTimer = true; //可以开始计时
            //FinishCurTaskImmediately();//test
            break;

        case 1003:    //跟我来
            FinishCurTask();
            break;

        case 1004:    //走向走廊
            _melissaController.SetCanSkipStep(true);
            _melissaController.SetState(MelissaController.STATE.WALK);
            break;

        case 1005:    //走向房间门口
            _melissaController.SetCanSkipStep(true);
            _melissaController.SetState(MelissaController.STATE.WALK);
            break;

        case 1006:    //偷瞄一眼
            _melissaController.SetState(MelissaController.STATE.IDLE);
            FinishCurTaskDelay(0.5f);
            break;

        case 1007:    //开门
            _melissaController.SetState(MelissaController.STATE.IDLE);
            FinishCurTaskDelay(0.5f);
            break;

        case 1008:    //跑进去
            _melissaController.SetState(MelissaController.STATE.RUN);
            break;

        case 1009:    //躲在桌子下面,等待玩家进入房间
            _isStartDetection = true;
            _melissaController.SetState(MelissaController.STATE.CROUCH);
            //FinishCurTaskImmediately();//test
            break;

        case 1010:    //你不能使用枪械,否则整个地方都会炸开,看那里
            _melissaController.SetState(MelissaController.STATE.CROUCH);
            FinishCurTask();
            break;

        case 1011:    //跟着玩家走
            _melissaController.SetState(MelissaController.STATE.FOLLOW);
            FinishCurTaskDelay(0.5f);
            break;

        case 1012:    //如果玩家想硬闯,跟随或者跑掉
            _melissaController.SetState(MelissaController.STATE.IDLE);
            FinishCurTaskDelay(0.5f);
            break;

        case 1013:    //跟玩家建议用通风管道,等待玩家打开通风管道
            _melissaController.SetState(MelissaController.STATE.WALK);
            break;

        case 1014:    //张开双手,等待玩家将自己放进管道
            _isStartDetection = true;
            _melissaController._isCanCreep = true;
            _melissaController.SetState(MelissaController.STATE.OPEN_HAND);
            //FinishCurTaskImmediately();//test
            break;

        case 1015:                                                                 //爬向出口
            _melissa.transform.position = new Vector3(-17.478f, 49.518f, 27.481f); //test
            _melissaController.SetState(MelissaController.STATE.CREEP);
            break;

        case 1016:    //提示玩家向通风口外看
            _melissaController.SetState(MelissaController.STATE.IDLE);
            FinishCurTaskDelay(0.5f);
            break;

        case 1017:    //走出通风口
            _isStartDetection = true;
            _melissaController.SetCanSkipStep(false);
            _melissaController.SetState(MelissaController.STATE.WALK);
            break;

        case 1018:    //跟随玩家
            _isStartDetection = true;
            _melissaController.SetState(MelissaController.STATE.FOLLOW);
            //FinishCurTaskDelay(0.5f);
            break;

        case 1019:    //玩家进门时,说话
            FinishCurTask();
            break;

        case 1020:    //跟随玩家
            _isStartDetection = true;
            _melissaController.SetState(MelissaController.STATE.FOLLOW);
            //FinishCurTaskDelay(0.5f);
            break;

        case 1021:    //到达实验室,说话
            _melissaController.SetState(MelissaController.STATE.TALK);
            FinishCurTask();
            break;

        case 1022:    //走向桌子
            _melissaController.SetCanSkipStep(true);
            _melissaController.SetState(MelissaController.STATE.WALK);
            break;

        case 1023:    //玩家砸玻璃,躲到桌子下
            _isStartDetection = true;
            _melissaController.SetState(MelissaController.STATE.CROUCH);

            break;

        case 1024:    //玩家打死 僵尸之后,跟随玩家
            _isStartDetection = true;
            _melissaController.SetState(MelissaController.STATE.FOLLOW);
            //_melissaController.SetState(MelissaController.STATE.WALK);
            //FinishCurTaskDelay(0.5f);
            break;

        case 1025:                //妈妈,你在吗
            _isStartTimer = true; //开始计算说话时间
            _melissaController.SetState(MelissaController.STATE.TALK);
            //FinishCurTask();
            break;

        case 1026:    //好的,妈妈!我会守在这等你。
            _isStartTimer = true;
            _melissaController.SetState(MelissaController.STATE.TALK);
            //FinishCurTask();
            //TODO等待玩家锯开门
            break;

        case 1027:    //与Amy团聚
            _melissaController.SetState(MelissaController.STATE.IDLE);
            FinishCurTaskDelay(0.5f);
            break;

        case 1028:    //Amy死了,Melissa恨死玩家,摔门而去
            _melissaController.SetState(MelissaController.STATE.RUN);
            break;
        }
    }
Exemple #3
0
    private void EnterStory(NPC_StoryConfig story)
    {
        Debug.Log("Lizzy--当前任务ID" + story.taskId + "---" + story.description);
        _curLizzyTask = story;
        _lizzyAudioController.PlaySound(story.audioId);
        _lizzyController.SetTargetPoint(story.targetPos);

        _taskStartTime = TimeHelper.GetCurrentRealTimestamp();
        if (story.audioId > 0)
        {
            _audioWaitTime = _lizzyAudioController.GetCurAudioLength(story.audioId);
        }
        else
        {
            _audioWaitTime = 0f;
        }

        switch (_lizzyStoryProcess.curTaskID)
        {
        case 1001:    //出现
            //FinishCurTaskImmediately(1007);   //test
            //_isStartDetection = true;
            //_lizzyController.SetCanSkipStep(false);
            //_lizzyController.SetState(LizzyController.STATE.RUN);
            //FinishCurTask();    //test
            break;

        case 1002:    //说话:快帮帮我们!我们需要帮助!
            _isStartTimer = true;
            //FinishCurTask();    //test
            break;

        case 1003:    //说话:你到底在想些什么?
            _isStartTimer = true;
            //FinishCurTask();    //test
            break;

        case 1004:    //说话:好我知道!
            _isStartTimer = true;
            //FinishCurTask();    //test
            break;

        case 1005:    //逃跑
            _lizzy.transform.position = new Vector3(-0.74f, 80.61f, 36.32f);
            //_lizzyController.SetCanSkipStep(false);
            _isStartDetection = true;
            _lizzyController.SetState(LizzyController.STATE.IDLE);
            //FinishCurTask();    //test
            break;

        case 1006:    //陷入困境
            _isStartDetection = true;
            _lizzyController.SetCanSkipStep(false);
            _lizzyController.SetState(LizzyController.STATE.RUN);
            break;

        case 1007:    //看到玩家后,说话:啊呃呃,救我…救我出这里!
            FinishCurTask();
            break;

        case 1008:    //说话:谁..你是谁?…噢是你!对不起不是我的错。George...!
            FinishCurTask();
            break;

        case 1009:    //(哭泣道)…我不想死…至少不要在今天…
            TaskStepManagaer.Instance.FinishCurTaskImmediately();
            FinishCurTask();
            //_isStartDetection = true;

            break;

        case 1010:    //如果玩家走开不救,:不…不要…不要留我在这里等死!求求你!!!(Lizzy剧情结束)
            _isStartDetection = true;
            _lizzyController.SetCanSkipStep(false);
            _lizzyController.SetState(LizzyController.STATE.RUN);
            //if (_isRescued) //救了就立即跳到下一步
            //{
            //    FinishCurTaskImmediately();
            //}
            break;

        case 1011:    //如果被救,:谢谢你救我!对于之前发生的事情,我很抱歉,因为我太害怕了!
            _lizzyController.SetState(LizzyController.STATE.DEATH);
            TaskStepManagaer.Instance.FinishCurTaskImmediately();
            //FinishCurTask();
            break;

        case 1012:    //如果被救,:谢谢你救我!对于之前发生的事情,我很抱歉,因为我太害怕了!
            FinishCurTask();
            break;

        case 1013:    //:不管怎么样…我知道有条路可以带你到顶楼。跟我来!
            FinishCurTask();
            break;

        case 1014:    //带领玩家走
            _lizzyController.SetCanSkipStep(true);
            _lizzyController.SetState(LizzyController.STATE.WALK);
            TaskStepManagaer.Instance.FinishCurTaskImmediately();
            //FinishCurTask();
            break;

        case 1015:    //搬橱柜,玩家帮忙
            _isStartDetection = true;
            _lizzyController.SetState(LizzyController.STATE.IDLE);
            //FinishCurTask();
            break;

        case 1016:    //“这个通道直达那边的楼梯,通过楼梯到上一层,那里有...”
            FinishCurTask();
            break;

        case 1017:    //被攻击,“阿呃呃”
            _lizzyController.SetState(LizzyController.STATE.DEATH);
            break;

        case 1018:    //技能动作,被攻击
            FinishCurTask();
            break;

        case 1019:    //躺在地上,奄奄一息
            //_lizzyController.SetState(LizzyController.STATE.LAY_DOWN);
            FinishCurTask();
            break;

        case 1020:    //打败敌人后,“咳咳…我想我活不了了。救救Rick…”
            FinishCurTask();
            break;

        case 1021:    //咳嗽,吐血
            FinishCurTask();
            break;

        case 1022:    //“谢谢你…还有..对不…起”
            FinishCurTask();
            break;

        case 1023:    //极乐
            _lizzyController.SetState(LizzyController.STATE.DEATH);
            break;
        }
    }
Exemple #4
0
    private void EnterTask(NPC_StoryConfig task)
    {
        Debug.Log("Amy--当前剧情" + task.taskId + "---" + task.description);
        _amyAudioController.PlaySound(task.audioId);
        _taskStartTime = TimeHelper.GetCurrentRealTimestamp();
        if (task.audioId > 0)
        {
            _audioWaitTime = _amyAudioController.GetCurAudioLength(task.audioId);
        }
        else
        {
            _audioWaitTime = 0f;
        }
        switch (_amyStoryProcess.curStoryID)
        {
        case 1000:    //出现
            FinishCurTask();
            break;

        case 1001:    //RICK 你快滚开
            _isStartTimer = true;
            //FinishCurTask();
            break;

        case 1002:    //是你吗,宝贝你是怎么逃出来的
            _isStartTimer = true;
            //FinishCurTask();
            break;

        case 1003:    //外面的先生,不管你是谁,请不要伤害 我的女儿
            _isStartTimer = true;
            //FinishCurTask();
            break;

        case 1004:    //Melissa可以帮你,麻烦你照顾好她
            _isStartTimer = true;
            //FinishCurTask();  //test
            break;

        case 1005:    //Amy走过去,平息George
            //FinishCurTask();
            FinishCurTaskImmediately();
            break;

        case 1006:    //Emily,他说得也有道理…难道你不想离开这里?
            _isStartTimer = true;
            break;

        case 1007:    //你愿意牺牲你自己,我也可以
            _isStartTimer = true;
            break;

        case 1008:    //你曾经有个儿子,你忘了?
            _isStartTimer = true;
            break;

        case 1009:    //好 现在让我们等!
            //FinishCurTask();
            break;

        case 1010:                //Melissa?宝贝,我在!
            _isStartTimer = true; //开始计时
            //FinishCurTask();
            break;

        case 1011:                //咦,Rick呢!George,Rick不见了!
            _isStartTimer = true; //说完跳到小女孩1010步
            //FinishCurTask();
            break;

        case 1012:                //Liz你觉得我们要去哪里?
            _isStartTimer = true; //说完跳到lizzy 1004步
            Level_10_Manager.Instance.CanChainsaw = true;
            //FinishCurTask();
            break;

        case 1013:    //与Melissa团聚
            FinishCurTask();
            break;

        case 1014:    //拿起激光锯打玩家
            _amyController.SetTarget(task.target);
            _amyController.SetState(AmyController.STATE.ATTACK_WALK);
            break;

        case 1015:    //身死道消
            _amyController.SetState(AmyController.STATE.DEAD);
            break;
        }
    }
Exemple #5
0
    public void EnterTask(NPC_StoryConfig task)
    {
        Debug.Log("Jaycee--当前任务ID" + task.taskId + "---" + task.description);
        _curStory = task;
        _jayceeAudioController.PlaySound(task.audioId);

        _taskStartTime = TimeHelper.GetCurrentRealTimestamp();
        if (task.audioId > 0)
        {
            _audioWaitTime = _jayceeAudioController.GetCurAudioLength(task.audioId);
        }
        else
        {
            _audioWaitTime = 0f;
        }

        switch (jayceeStoryProcess.curTaskID)
        {
        case 1001:    //Jaycee出现
            _jayceeHumanController.StartAppear();
            FinishCurTaskDelay(0.5f);
            break;

        case 1002:    //走向门口
            //_jayceeHumanController.SetTargetPoint(task.targetPos);
            //_jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.RUN);
            FinishCurTask();
            break;

        case 1003:    //回头看
            FinishCurTaskImmediately();
            break;

        case 1004:    //向厕所跑
            _jayceeHumanController.SetTargetPoint(task.targetPos);
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.RUN);
            break;

        case 1005:    //在厕所等待玩家,拿起扫把
            _isStartDetection = true;
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.IDLE);
            humanState.transform.Rotate(new Vector3(0, 180, 0));
            _jayceeHumanController.SetActiveBesom(true);
            _jayceeHumanController.isCanRobBesom = true;
            TaskStepManagaer.Instance.FinishCurTaskImmediately();
            break;

        case 1006:    //玩家从大厅进门后,说话
            _isStartDetection = true;
            break;

        case 1007:    //玩家到达门口,说话
            _isStartDetection = true;
            break;

        case 1008:     //进门,打玩家
            _isStartDetection = true;
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.ATTACK);
            break;

        case 1009:    //抢完了扫把,蹲在地上说话
            _isStartDetection = true;
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.CROUCH);
            break;

        case 1010:    //玩家出去之后,到达某一点,跑出去,等玩家
            _isStartDetection = true;
            _jayceeHumanController.SetCanSkipStep(false);
            _jayceeHumanController.SetTargetPoint(task.targetPos);
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.RUN);
            break;

        case 1011:    //跑向房间
            _isStartDetection = true;
            _jayceeHumanController.SetCanSkipStep(false);
            _jayceeHumanController.SetTargetPoint(task.targetPos);
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.RUN);
            //TaskStepManagaer.Instance.FinishCurTaskImmediately();
            break;

        case 1012:    //玩家到了另一个房间,跑出来
            _jayceeHumanController.SetCanSkipStep(true);
            _jayceeHumanController.SetTargetPoint(task.targetPos);
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.RUN);
            break;

        case 1013:    //跑出来之后,骂玩家
            _isStartDetection = true;
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.IDLE);
            TaskStepManagaer.Instance.FinishCurTaskImmediately();
            break;

        case 1014:    //玩家走近之后,带领玩家走
            FinishCurTaskImmediately();
            break;

        case 1015:    //带玩家走
            _jayceeHumanController.SetTarget(_curStory.target.gameObject);
            _jayceeHumanController.SetCanSkipStep(true);
            _jayceeHumanController.SetTargetPoint(task.targetPos);
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.LEADER);
            TaskStepManagaer.Instance.FinishTaskTo(7001);
            break;

        case 1016:    //楼塌,跳过去
            _jayceeHumanController.SetCanSkipStep(false);
            _isStartDetection = true;
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.WALK);
            _jayceeHumanController.SetTargetPoint(task.targetPos);
            break;

        case 1017:    //往角落跑
            _jayceeHumanController.SetCanSkipStep(true);
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.WALK);
            _jayceeHumanController.SetTargetPoint(task.targetPos);
            break;

        case 1018:    //跑向房间
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.WALK);
            _jayceeHumanController.SetTargetPoint(task.targetPos);
            break;

        case 1019:    //跑向一个房间,关门,等待玩家
            _isStartDetection = true;
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.IDLE);
            //FinishCurTaskDelay(0.5f);//test
            break;

        case 1020:    //再次见到玩家,说话
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.IDLE);
            FinishCurTask();
            break;

        case 1021:      //往房间走
            _jayceeHumanController.SetTargetPoint(task.targetPos);
            _jayceeHumanController.SetTarget(_curStory.target.gameObject);
            _jayceeHumanController.SetCanSkipStep(true);
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.LEADER);
            break;

        case 1022:      //被怪物攻击
            //_isStartDetection = true;
            break;

        case 1023:      //怪物被打死之后,继续向房间走
            _jayceeHumanController.SetTargetPoint(task.targetPos);
            _jayceeHumanController.SetTarget(_curStory.target.gameObject);
            _jayceeHumanController.SetCanSkipStep(true);
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.LEADER);
            break;

        case 1024:      //被怪物攻击
            //_isStartDetection = true;
            break;

        case 1025:      //怪物被打死,带领玩家走到柜子旁边
            _isStartDetection = true;
            _jayceeHumanController.SetTarget(_curStory.target.gameObject);
            _jayceeHumanController.SetTargetPoint(task.targetPos);
            _jayceeHumanController.SetCanSkipStep(false);
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.LEADER);
            break;

        case 1026:    //打开柜子
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.IDLE);
            FinishCurTaskDelay(0.5f);
            break;

        case 1027:    //说话
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.IDLE);
            FinishCurTask();
            break;

        case 1028:    //走到另一边
            _jayceeHumanController.SetCanSkipStep(true);
            _jayceeHumanController.SetTargetPoint(task.targetPos);
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.WALK);
            break;

        case 1029:    //说话
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.IDLE);
            FinishCurTask();
            break;

        case 1030:    //边走边说,等待玩家拿起注射器
            _isStartDetection = true;
            _jayceeHumanController.SetCanSkipStep(false);
            _jayceeHumanController.SetTargetPoint(task.targetPos);
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.WALK);
            //FinishCurTaskImmediately();//test
            break;

        case 1031:    //玩家拿起了注射器,然后外面发起尖叫,跑出房间,边跑边说
            //_isStartDetection = true;
            _jayceeHumanController.SetCanSkipStep(true);
            _jayceeHumanController.SetTargetPoint(task.targetPos);
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.RUN);
            break;

        case 1032:    //玩家到达,抱起女孩,说话
            //_isStartDetection = true;
            //_jayceeHumanController.SetCanSkipStep(true);
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.IDLE);
            FinishCurTask();
            break;

        case 1033:    //跑向房间
            _jayceeHumanController.SetCanSkipStep(false);
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.RUN);
            _jayceeHumanController.SetTargetPoint(task.targetPos);
            break;

        case 1034:    //后退,撞墙
            _jayceeHumanController.SetCanSkipStep(true);
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.WALK_BACK);
            _jayceeHumanController.SetTargetPoint(task.targetPos);
            //FinishCurTaskDelay(3f);//WSM
            break;

        case 1035:    //摔倒
            _jayceeHumanController.SetState(JayceeHumanController.JAYCEE_H_STATE.CROUCH);
            FinishCurTaskDelay(0.5f);
            break;

        case 1036:    //说话
            FinishCurTask();
            break;

        case 1037:    //身体抖动,说话
            FinishCurTask();
            break;

        case 1038:    //剧烈抖动,脸变色,说话
            FinishCurTask();
            break;

        case 1039:    //变身
            humanState.SetActive(false);
            monsterState             = UtilFunction.ResourceLoad(MONSTER_JAYCEE_PATH);
            _jayceeMonsterController = monsterState.GetComponent <JayceeMonsterController>();
            break;

        case 1040:    //起身
            FinishCurTask();
            break;

        case 1041:    //打玩家
            break;

        case 1042:    //变boss
            break;

        case 1043:    //追玩家
            break;
        }
    }
Exemple #6
0
    //public bool IsHasCurTask()
    //{

    //}

    private void EnterTask(NPC_StoryConfig rickTask)
    {
        Debug.Log("Rick--当前剧情" + rickTask.taskId + "---" + rickTask.description);
        _curRickStory = rickTask;
        _rickAudioController.PlaySound(rickTask.audioId);
        _rickController.SetTargetPoint(rickTask.targetPos);

        _taskStartTime = TimeHelper.GetCurrentRealTimestamp();
        if (rickTask.audioId > 0)
        {
            _audioWaitTime = _rickAudioController.GetCurAudioLength(rickTask.audioId);
        }
        else
        {
            _audioWaitTime = 0f;
        }

        switch (_rickStoryRrocess.curTaskID)
        {
        case 1001:    //出现
            FinishCurTaskDelay(0.5f);
            break;

        case 1002:    //在屋里面,进行剧情
            FinishCurTaskDelay(0.5f);
            break;

        case 1003:    //躲到一边
            _rickController.SetCanSkipStep(true);
            _rickController.SetState(RickController.STATE.WALK);
            break;

        case 1004:    //逃跑
            _rickController.SetState(RickController.STATE.IDLE);
            _rick.transform.position = rickTask.targetPos;
            FinishCurTask();
            break;

        case 1005:    //再次出现
            //再次看到玩家
            _isStartDetection = true;
            break;

        case 1006:    //打玩家
            //FinishCurTaskDelay(0.5f);
            _isStartDetection = true;
            _rickController.SetState(RickController.STATE.ATTACK);
            break;

        case 1007:    //"说话:不!你没法活捉我!滚开!"
            FinishCurTask();
            //_isStartDetection = true;
            break;

        case 1008:    //被玩家捉住之后,说话:不要…不要杀我!我能帮到你…
            _rickController.SetState(RickController.STATE.IDLE);
            FinishCurTask();
            break;

        case 1009:    //说话:你来这里是为了救…我?但是为什么呢…?
            FinishCurTask();
            break;

        case 1010:    //说话:好吧,那让我离开这该死的洞吧!首先,我们需要去武器室!
            FinishCurTask();
            break;

        case 1011:    //带领玩家去找武器
            _rickController.SetCanSkipStep(true);
            _rickController.SetTarget(_curRickStory.target.gameObject);
            _rickController.SetState(RickController.STATE.LEADER);
            break;

        case 1012:    //打开一个抽屉
            //播放一个打开抽屉的动画
            _isStartDetection = true;
            break;

        case 1013:    //向楼上走
            _rickController.SetCanSkipStep(true);
            _rickController.SetTarget(_curRickStory.target.gameObject);
            _rickController.SetState(RickController.STATE.LEADER);
            break;

        case 1014:    //向玩家介绍rab
            FinishCurTask();
            break;

        case 1015:    //开门
            FinishCurTaskDelay(2);
            break;

        case 1016:    //带玩家走,去武器库
            _isStartDetection = true;
            _rickController.SetCanSkipStep(false);
            _rickController.SetTarget(_curRickStory.target.gameObject);
            _rickController.SetState(RickController.STATE.LEADER);
            break;

        case 1017:    //跟随玩家走
            _isStartDetection = true;
            _rickController.SetState(RickController.STATE.FOLLOW);
            break;

        case 1018:    //说话:用光弹吧,闪瞎它。你有1分钟的时间,1分钟后,
            FinishCurTaskImmediately();
            break;

        case 1019:    //向后退,远远的看着
                      //_isStartDetection = true;
                      //_rickController.SetState(RickController.STATE.WALK); //向后退一段时间,然后转身,向后方走
            FinishCurTaskImmediately();
            break;

        case 1020:    //玩家拿到钥匙之后,跑向玩家
            _rickController.SetCanSkipStep(true);
            _rickController.SetState(RickController.STATE.WALK_TO);
            break;

        case 1021:    //跑到玩家跟前,跟随
            //_isStartDetection = true;
            _rickController.SetState(RickController.STATE.FOLLOW);
            break;
            //case 1022://
            //    break;
            //case 1023://
            //    FinishCurTaskDelay(0.5f);
            //    break;
            //case 1024://
            //          //_melissaController.SetState(MelissaController.STATE.WALK);
            //    FinishCurTaskDelay(0.5f);
            //    break;
            //case 1025://
            //    FinishCurTaskDelay(0.5f);
            //    break;
            //case 1026://
            //    FinishCurTaskDelay(0.5f);
            //    break;
            //case 1027://
            //    FinishCurTaskDelay(0.5f);
            //    break;
            //case 1028://
            //    //FinishCurTaskDelay(0.5f);
            //    break;
        }
    }
Exemple #7
0
    private void EnterTask(NPC_StoryConfig task)
    {
        Debug.Log("Emily--当前剧情" + task.taskId + task.description);
        _curEmilyTask = task;
        _emilyAudioController.PlaySound(task.audioId);
        _emilyController.SetTargetPoint(task.targetPos);

        _taskStartTime = TimeHelper.GetCurrentRealTimestamp();
        if (task.audioId > 0)
        {
            _audioWaitTime = _emilyAudioController.GetCurAudioLength(task.audioId);
        }
        else
        {
            _audioWaitTime = 0f;
        }

        switch (_emilyStoryProcess.curTaskID)
        {
        case 1001:     //出现
            break;

        case 1002:      //说话:等下,好像门口有人!
            _isStartTimer = true;
            _emilyController.SetState(EmilyController.STATE.IDLE);
            break;

        case 1003:      //说话:帮帮我们离开这里!
            _isStartTimer = true;
            _emilyController.SetState(EmilyController.STATE.IDLE);
            break;

        case 1004:      //说话:不,你们绝不能那么做!
            _isStartTimer = true;
            break;

        case 1005:      //说话:不…我不要这么做!
            _isStartTimer = true;
            break;

        case 1006:      //说话:Rick 你倒是说些什么呀?
            _isStartTimer = true;
            break;

        case 1007:      //说话:你怎么知道,他可能是好人!
            _isStartTimer = true;
            break;

        case 1008:      //说话:不…这是错误的做法,这么做会把我们都毁了…  等待玩家救援
            //TODO 等待救援
            _emily.transform.position = new Vector3(-25.76f, 46.25f, 29.8f);
            _isStartTimer             = true;
            _isStartDetection         = true;
            break;

        case 1009:      //说话:噢,谢谢你!我就知道会发生这样的事情!
            FinishCurTask();
            break;

        case 1010:      //说话:你看那边!你从这门走过去,就能看到电梯。
            FinishCurTask();
            break;

        case 1011:      //说话:我不跟你一起去了,我还有别的事要做
            FinishCurTask();
            break;

        case 1012:      //说话:对了,如果你找到Rick,救他一命。
            FinishCurTask();
            break;

        case 1013:      //消失
            //FinishCurTask();
            _emily.transform.position = new Vector3(-26.445f, 88.4924f, 33.424f);
            break;

        case 1014:      //出现在平民中间
            _isStartDetection = true;
            _emilyController.SetState(EmilyController.STATE.WALK_TO);
            //FinishCurTask();
            break;

        case 1015:      //走出来感谢玩家
            FinishCurTask();
            break;

        case 1016:      //说话:真是很谢谢你!
            FinishCurTask();
            break;

        case 1017:      //说话:这里的情况变得越来越糟糕,你们把电源切断后,
            _isStartDetection = true;
            _emilyController.SetCanSkip(false);
            _emilyController.SetState(EmilyController.STATE.WALK);
            //FinishCurTask();
            break;

        case 1018:      //说话:你可以通过这条路走到上一层
            FinishCurTask();
            break;

        case 1019:      //拿起重物,扔
            FinishCurTask();
            break;

        case 1020:      //如果玩家要求跳过去,然后摔死
            FinishCurTask();
            break;

        case 1021:      //说话:看,你现在明白了吧
            FinishCurTask();
            break;

        case 1022:      //说话:我们现在就要出发了!
            FinishCurTask();
            break;

        case 1023:      //说话:不管你是谁
            break;
        }
    }
Exemple #8
0
    private void EnterStory(NPC_StoryConfig story)
    {
        Debug.Log("George--当前任务:" + _georgeStoryProcess.curTaskID + "---" + story.description);
        _curGeorgeStory = story;
        _georgeAudioController.PlaySound(story.audioId);

        _taskStartTime = TimeHelper.GetCurrentRealTimestamp();
        if (story.audioId > 0)
        {
            _audioWaitTime = _georgeAudioController.GetCurAudioLength(story.audioId);
        }
        else
        {
            _audioWaitTime = 0f;
        }

        switch (_georgeStoryProcess.curTaskID)
        {
        case 1001:      //出现
            //FinishCurTask();
            break;

        case 1002:      //说话:是不是外面有人?
            //FinishCurTask();
            _isStartTimer = true;
            break;

        case 1003:      //说话:求求你帮我们离开这里!
            //FinishCurTask();
            _isStartTimer = true;
            break;

        case 1004:                    //说话:帮我们想办法把门打开。
            _isStartTimer     = true;
            _isStartDetection = true; //检测玩家到达监控室
            //FinishCurTask();    //test
            break;

        case 1005:      //说话:门打开后,我们要一起干倒这个士兵
            _isStartTimer = true;
            break;

        case 1006:      //把Emily推到墙角
            //FinishCurTask();
            FinishCurTaskImmedately();
            break;

        case 1007:      //说话:你现在要听我的,要不你站在我们这边
            _isStartTimer = true;
            break;

        case 1008:      //说话:哈哈哈哈…
            _isStartTimer = true;
            break;

        case 1009:                    //把Emily整到屋里
            //TODO 拖着Emily走
            _isStartDetection = true; //TODO 判断玩家是否来到门前
            break;

        case 1010:      //说话:你们终于来了!但是这门好像被什么卡住了!
            //FinishCurTask();
            _isStartTimer = true;
            break;

        case 1011:                    //说话:他走不了很远。他需要我们!
            _isStartTimer     = true; //说完跳到Amy 1012步
            _isStartDetection = true; //TODO 判断玩家是否来到门前

            //FinishCurTask();
            break;

        case 1012:      //说话:太好了,你把门锯开了!
            FinishCurTask();
            break;

        case 1013:      //打玩家
            _georgeController.SetTarget(story.target);
            _georgeController.SetState(GeorgeController.STATE.ATTACK_WALK);
            break;

        case 1014:
            _georgeController.SetState(GeorgeController.STATE.DEATH);
            break;
        }
    }