public void showCharaInfoMenu(Character chara, string[] content)
    {
        mouseMoveManger.updateLock(true);
        if (chara.isPlayer())
        {
            // Debug.Log("click 2");
            duiHuaUImanager.showDuiHua(chara.getLiHuiURL(), content, 0);
        }
        else
        {
            Debug.Log("click 2");
            this.chara   = chara;
            this.content = content;
            UIInfoMenu.SetActive(true);
            UIInfoMenu.transform.localPosition = showPos;

            NPCStrSlider.value = this.chara.getAbilityInfo()[0];

            NPCSpeSlider.value = this.chara.getAbilityInfo()[1];

            NPCIntSlider.value = this.chara.getAbilityInfo()[2];

            NPCSanSlider.value = this.chara.getAbilityInfo()[3];

            NPCStrText.text = "力量" + this.chara.getAbilityInfo()[0] + "/" + this.chara.getMaxAbilityInfo()[0];
            NPCSpeText.text = "速度" + this.chara.getAbilityInfo()[1] + "/" + this.chara.getMaxAbilityInfo()[1];
            NPCIntText.text = "智力" + this.chara.getAbilityInfo()[2] + "/" + this.chara.getMaxAbilityInfo()[2];
            NPCSanText.text = "神志" + this.chara.getAbilityInfo()[3] + "/" + this.chara.getMaxAbilityInfo()[3];

            NPCName.text = this.chara.getName();

            NPCDesc.text = this.chara.getDesc();

            if (chara.getAbilityInfo()[3] <= 3 || chara.isBoss())
            {
                this.talkButton.SetActive(false);
                this.useButton.SetActive(false);
                this.battleButton.SetActive(true);
            }
            else
            {
                this.talkButton.SetActive(true);
                this.useButton.SetActive(true);
                this.battleButton.SetActive(false);
            }
        }
    }
Example #2
0
    private bool spItemforP4(NPC forNPCchara, Item item, BattleMenuUI battleMenuUI)
    {
        Debug.Log("使用任务道具");
        if (forNPCchara.isBoss() && item.getCode() == ItemConstant.ITEM_CODE_SPEC_Y0006)
        {
            int san = forNPCchara.getAbilityInfo()[3];
            if (san + 4 > forNPCchara.getMaxAbilityInfo()[3])
            {
                forNPCchara.getAbilityInfo()[3] = forNPCchara.getMaxAbilityInfo()[3];
            }
            else
            {
                forNPCchara.getAbilityInfo()[3] = san + 2;
            }
            Debug.Log("使用任务道具成功");
            battleMenuUI.hidenUI(false);
            duiHuaUImanager.showDuiHua(forNPCchara.getLiHuiURL(), new string[] { "父亲。。父亲的照片。", "为什么他会在这里?" }, 1);

            return(true);
        }
        else if (forNPCchara.isBoss() &&
                 item.getCode() == ItemConstant.ITEM_CODE_SPEC_Y0007)
        {
            int san = forNPCchara.getAbilityInfo()[3];
            if (san + 3 > forNPCchara.getMaxAbilityInfo()[3])
            {
                forNPCchara.getAbilityInfo()[3] = forNPCchara.getMaxAbilityInfo()[3];
            }
            else
            {
                forNPCchara.getAbilityInfo()[3] = san + 3;
            }
            Debug.Log("使用任务道具成功");
            battleMenuUI.hidenUI(false);
            duiHuaUImanager.showDuiHua(forNPCchara.getLiHuiURL(), new string[] { "医院保密文件?", "难道医生是好人?" }, 1);
            return(true);
        }
        else
        {
            Debug.Log("使用任务道具失败");
            return(false);
        }
    }
Example #3
0
 public override void doMiniOperation()
 {
     if (this.task.getTaskStatus() == TaskConstant.STATUS_INIT)
     {
         string[] beginContent = new string[] { "年轻人,我这里有一个宝贝,你想要吗?",
                                                "这个宝贝的来历可大了,听我慢慢道来。。。。",
                                                "咳咳咳,人老了,肺不行了,我需要补肺丸,年轻人,你能帮忙我买瓶补肺丸吗?" };
         duiHuaUImanager.showDuiHua(this.getLiHuiURL(), beginContent, 0);
         showConfirm = true;
     }
     else if (this.task.getTaskStatus() == TaskConstant.STATUS_BEGIN)
     {
         if (this.taskMananger.checkTaskDone(this.task))
         {
             string[] beginContent = new string[] { "好人啊!, 。。嗯。。好的了",
                                                    "我其实是个牧师, 擅长祈祷,来, 我先给祈祷一下。。。" };
             duiHuaUImanager.showDuiHua(this.getLiHuiURL(), beginContent, 0);
             this.task.getTaskAwards().executeAwards();
             this.task.setTaskStatus(TaskConstant.STATUS_END);
             this.taskMananger.removeTask(this.task);
             this.taskMananger.UpdateHistoryTask(this.task);
         }
         else
         {
             string[] beginContent = new string[] { "年轻人。。这个宝贝是这样来的。。。。",
                                                    "咳咳咳。。。。",
                                                    "咳咳咳。。。。血。。血都出来了。。。医生!" };
             duiHuaUImanager.showDuiHua(this.getLiHuiURL(), beginContent, 0);
         }
     }
     else if (this.task.getTaskStatus() == TaskConstant.STATUS_END)
     {
         string[] beginContent = new string[] { "好多了。。我说道那里了? ",
                                                "哎。。这记忆力不行了啊,,,",
                                                "你是谁?。。赶紧离我远点。。我有传染病!" };
         duiHuaUImanager.showDuiHua(this.getLiHuiURL(), beginContent, 0);
     }
     else if (this.task.getTaskStatus() == TaskConstant.STATUS_INDALID)
     {
         string[] beginContent = new string[] { "安静!。。安静!。。老人家要多休息。" };
         duiHuaUImanager.showDuiHua(this.getLiHuiURL(), beginContent, 0);
     }
 }
Example #4
0
 public override void doMiniOperation()
 {
     if (this.task.getTaskStatus() == TaskConstant.STATUS_INIT)
     {
         string[] beginContent = new string[] { "朋友,我这里有一根烟,你想要吗?",
                                                "这烟劲可大了,吸一口爽几天。。。。",
                                                "看见旁边的老人了吗?他就是吸成这样的" };
         duiHuaUImanager.showDuiHua(this.getLiHuiURL(), beginContent, 0);
         showConfirm = true;
     }
     else if (this.task.getTaskStatus() == TaskConstant.STATUS_BEGIN)
     {
         if (this.taskMananger.checkTaskDone(this.task))
         {
             string[] beginContent = new string[] { "嗯,不错!, 。。嗯。。好的了",
                                                    "我其实是个小偷, 帮你的东西拿来。。。" };
             duiHuaUImanager.showDuiHua(this.getLiHuiURL(), beginContent, 0);
             this.task.getTaskAwards().executeAwards();
             this.task.setTaskStatus(TaskConstant.STATUS_END);
             this.taskMananger.removeTask(this.task);
             this.taskMananger.UpdateHistoryTask(this.task);
         }
         else
         {
             string[] beginContent = new string[] { "朋友。。这烟要钱的。。。。。。",
                                                    "咳咳咳。。。。" };
             duiHuaUImanager.showDuiHua(this.getLiHuiURL(), beginContent, 0);
         }
     }
     else if (this.task.getTaskStatus() == TaskConstant.STATUS_END)
     {
         string[] beginContent = new string[] { "你还想要? ",
                                                "没有了 没有了,,,",
                                                "看看地上还有没有烟屁股吧。。" };
         duiHuaUImanager.showDuiHua(this.getLiHuiURL(), beginContent, 0);
     }
     else if (this.task.getTaskStatus() == TaskConstant.STATUS_INDALID)
     {
         string[] beginContent = new string[] { "滚开。" };
         duiHuaUImanager.showDuiHua(this.getLiHuiURL(), beginContent, 0);
     }
 }
Example #5
0
    public bool regisisterTask(TaskInterface task)
    {
        if (regisitedTasks.Count > 3)
        {
            duiHuaUImanager = FindObjectOfType <DuiHuaUImanager>();
            roundController = FindObjectOfType <RoundController>();
            duiHuaUImanager.showDuiHua(roundController.getPlayerChara().getLiHuiURL(), new string[] { "任务有点多了,先完成前面的吧。" }, 0);
            return(false);
        }


        if (this.getTaskByTaskCode(task.getTaskCode()) != null || task.getTaskStatus() == TaskConstant.STATUS_INDALID)
        {
            Debug.Log("cant regisiter task is " + task.getTaskCode());
            return(false);
        }
        else
        {
            Debug.Log("regisiter task is " + task.getTaskCode());
            regisitedTasks.Add(task);
            return(true);
        }
    }