//Mouse click
 public void OnMouseUpAsButton()
 {
     if (name.Equals("button1"))
     {
         LoadConversation.SetConversation("0-0-1", 0, "conversation");
         SceneManager.LoadScene("conversation");
     }
     if (name.Equals("button2"))
     {
         ReturnPre.preScene = "startMenu";
         SceneManager.LoadScene("accessProgress");
     }
     if (name.Equals("button3"))
     {
     }
 }
Exemple #2
0
 private void OnMouseUpAsButton()
 {
     GlobalVariable.currentScene = mountainInformation.serialnumber;
     if (GlobalVariable.HasFightBossScenes.Contains(GlobalVariable.currentScene))
     {
         LoadConversation.SetConversation("0-9-0", 0, "tertiaryMap");
     }
     else
     {
         if (GlobalVariable.AllConversationList.Contains(GlobalVariable.currentScene + "-0") &&
             !GlobalVariable.HasFightScenes.Contains(GlobalVariable.currentScene))
         {
             LoadConversation.SetConversation(GlobalVariable.currentScene, 0, "fight");
         }
         else
         {
             SceneManager.LoadScene("fighting");
         }
     }
 }
Exemple #3
0
    ChatControl chtBtn;            //对话按钮

    // Use this for initialization
    void Start()
    {
        //初始化
        Player    = GameObject.FindGameObjectWithTag("Player").transform;
        thisTrans = this.transform;
        //Chat_Rec = Button_Chat.GetComponent<RectTransform>();
        Load_chatTxt = GetComponent <LoadConversation>();
        chtBtn       = GameObject.FindObjectOfType <ChatControl>();
        //print("ChatButton:" + chtBtn.gameObject.name);

        /*
         * //获取技能键的初始位置
         * int len = SkillButtons.Length;
         * originPos = new Vector2[len];
         * for (int i = 0; i < len; i++)
         * {
         *  originPos[i] = SkillButtons[i].anchoredPosition;
         * }
         */
    }
Exemple #4
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetMouseButtonDown(0) && !isFirstClick)
        {
            isFirstClick = true;
            Destroy(monsterInfo);
            itemReward.SetActive(true);
            return;
        }
        if (Input.GetMouseButtonDown(0) && isFirstClick && !isSecondClick)
        {
            isSecondClick = true;
            Destroy(itemReward);
            cardReward.SetActive(true);
            return;
        }
        if (Input.GetMouseButtonDown(0) && isSecondClick && !isThridClick)
        {
            isThridClick = true;
            Destroy(cardReward);
            attributeReward.SetActive(true);
            return;
        }
        if (Input.GetMouseButtonDown(0) && isThridClick && !isFourthClick && AttributeUp.isUp)
        {
            if (isFirstUp &&
                !GlobalVariable.HasFightScenes.Contains(GlobalVariable.currentScene))
            {
                isFirstUp = false;
                return;
            }
            Destroy(attributeReward);
            AttributeUp.isUp = false;

            if (HasBoss())
            {
                GlobalVariable.HasFightBossScenes.Add(GlobalVariable.currentScene);
                if (HasAreaBoss())
                {
                    GlobalVariable.HasFightAreaBoss.Add(GlobalVariable.preMap, true);
                }
            }
            if (GlobalVariable.AllConversationList.Contains(GlobalVariable.currentScene + "-1"))
            {
                if (GlobalVariable.currentScene.StartsWith("0"))
                {
                    if (int.Parse(GlobalVariable.currentScene.Split('-')[2]) < 3)
                    {
                        LoadConversation.SetConversation(GlobalVariable.currentScene, 1, "conversation");
                    }
                    else
                    {
                        TertiaryMapSelect.SetScene("1-1");
                        LoadConversation.SetConversation(GlobalVariable.currentScene, 1, "tertiaryMap");
                    }
                }
                else
                {
                    if (!GlobalVariable.HasFightScenes.Contains(GlobalVariable.currentScene))
                    {
                        LoadConversation.SetConversation(GlobalVariable.currentScene, 1, "tertiaryMap");
                    }
                    else
                    {
                        TertiaryMapSelect.SetScene(GlobalVariable.preMap);
                        SceneManager.LoadScene("tertiaryMap");
                    }
                }
            }
            else
            {
                TertiaryMapSelect.SetScene(GlobalVariable.preMap);
                SceneManager.LoadScene("tertiaryMap");
            }
            GlobalVariable.HasFightScenes.Add(GlobalVariable.currentScene);
            GlobalVariable.Mountains[GlobalVariable.currentScene].status = true;
            return;
        }
    }