コード例 #1
0
    public void Bomb()
    {
        int _mp = Skill_Register.GetSkill("MagicSkill1").mp_use;

        if (Property_Controller.Instance.Get_CurrentMP() >= _mp &&
            cd[0] <= 0)
        {
            used_skill = true;
            cd[0]      = Skill_Register.GetSkill("MagicSkill1").cd;
            Property_Controller.Instance.Change_CurrentMP(-_mp);
            //mp-=20;
            animator.SetTrigger("bomb_trigger");
            cols = Physics.OverlapSphere(character.transform.position, 5f);
            for (int i = 0; i < cols.Length; i++)
            {
                if (cols[i] != null && cols[i].tag == "monster")
                {
                    Monster_Manage monster = cols[i].GetComponent <Monster_Manage>();
                    monster.Monster_Manage_Change_Hp(-Skill_Damage.Instance.GetDamage("MagicSkill1"));
                }
            }
            Instantiate(bomb_particle, character.transform.position, character.transform.rotation);
            character.transform.position -= character.transform.forward * 8f;
        }
    }
コード例 #2
0
    void Shackles()
    {
        cols = Physics.OverlapSphere(character.transform.position, 8f);
        int _mp = Skill_Register.GetSkill("MagicSkill4").mp_use;

        if (Property_Controller.Instance.Get_CurrentMP() >= _mp &&
            TargetExist() &&
            cd[3] <= 0)
        {
            used_skill = true;
            Property_Controller.Instance.Change_CurrentMP(-_mp);
            cd[3] = Skill_Register.GetSkill("MagicSkill4").cd;
            Property_Controller.Instance.Change_CurrentMP(-_mp);
            DestroyForTime_CSP destroy = shackle_particle.GetComponent <DestroyForTime_CSP>();
            animator.SetTrigger("shackle_trigger");
            float timer = Skill_Register.GetSkill("MagicSkill4").skill_level * 0.5f + 2f;
            destroy.timer = timer;
            for (int i = 0; i < cols.Length; i++)
            {
                if (cols[i] != null && cols[i].tag == "monster")
                {
                    Monster_Manage monster = cols[i].GetComponent <Monster_Manage>();
                    monster.Monster_Manage_Change_Hp(-Skill_Damage.Instance.GetDamage("MagicSkill4"));
                    Instantiate(shackle_particle, cols[i].transform.position, cols[i].transform.rotation);
                    monster.stop = true;
                }
            }
            Collider[] temp_cols = cols;

            StartCoroutine(UnShackles(temp_cols, timer));
        }
    }
コード例 #3
0
 public void Upgrade()
 {
     if (Property_Controller.Instance.Get_Skill_Point() > 0)
     {
         Skill_Register.GetSkill(DetailLoad.skill_name).skill_level++;
         Property_Controller.Instance.Change_Skill_Point(-1);
     }
 }
コード例 #4
0
 public void FlameClose()
 {
     if (cd[3] <= 0)
     {
         cd[3]      = Skill_Register.GetSkill("SwordSkill3").cd;
         flame_mode = false;
         Skill_Register.GetSkill("SwordSkill3").effect = FlameOpen;
         Property_Controller.Instance.Change_AD(-ad_add);
         ad_add = 0;
     }
 }
コード例 #5
0
    public void FlameOpen()
    {
        int _mp = Skill_Register.GetSkill("SwordSkill3").mp_use;

        if (Property_Controller.Instance.Get_CurrentMP() >= _mp && cd[3] <= 0)
        {
            used_skill = true;
            cd[3]      = Skill_Register.GetSkill("SwordSkill3").cd;
            Property_Controller.Instance.Change_CurrentMP(-_mp);
            flame_mode = true;
            Skill_Register.GetSkill("SwordSkill3").effect = FlameClose;
        }
    }
コード例 #6
0
    public void Orb()
    {
        int _mp = Skill_Register.GetSkill("MagicSkill3").mp_use;

        if (Property_Controller.Instance.Get_CurrentMP() >= _mp &&
            cd[2] <= 0)
        {
            used_skill = true;
            Property_Controller.Instance.Change_CurrentMP(-_mp);
            cd[2] = Skill_Register.GetSkill("MagicSkill3").cd;
            animator.SetTrigger("orb_trigger");
            Invoke("CreateOrb", 0.36f);
        }
    }
コード例 #7
0
    public void Lightning()
    {
        int _mp = Skill_Register.GetSkill("MagicSkill2").mp_use;

        cols = Physics.OverlapSphere(character.transform.position, 5f);
        if (Property_Controller.Instance.Get_CurrentMP() >= _mp &&
            TargetExist() &&
            cd[1] <= 0)
        {
            used_skill = true;
            Property_Controller.Instance.Change_CurrentMP(-_mp);
            cd[1] = Skill_Register.GetSkill("MagicSkill2").cd;
            animator.SetTrigger("lightning_trigger");
            Invoke("CallLightning", 0.5f);
            Instantiate(lightning_sound, character.transform.position, character.transform.rotation);
        }
    }
コード例 #8
0
    public void detail()
    {
        if (Property_Controller.my_Property == null)
        {
            return;
        }
        UILabel label = GetComponent <UILabel>();

        if (Property_Controller.my_Property.career == Career.Swordman)
        {
            GameObject temp       = transform.Find("MP").gameObject;
            UILabel    temp_label = temp.GetComponent <UILabel>();
            temp_label.text = Skill_Register.GetSkill("SwordSkill" + (DescriptionShow.current_click + 1)).mp_use + " mp";

            temp            = transform.Find("CD").gameObject;
            temp_label      = temp.GetComponent <UILabel>();
            temp_label.text = Skill_Register.GetSkill("SwordSkill" + (DescriptionShow.current_click + 1)).cd + " seconds";

            temp            = transform.Find("Damage").gameObject;
            temp_label      = temp.GetComponent <UILabel>();
            temp_label.text = Skill_Register.GetSkill("SwordSkill" + (DescriptionShow.current_click + 1)).damage_des + " [FFFFFF]: [FF0000]" + Skill_Damage.Instance.GetDamage("SwordSkill" + (DescriptionShow.current_click + 1));;

            temp            = transform.Find("Description").gameObject;
            temp_label      = temp.GetComponent <UILabel>();
            temp_label.text = Skill_Register.GetSkill("SwordSkill" + (DescriptionShow.current_click + 1)).des;
        }
        //label.text = "Lv" + Skill_Register.GetSkill("Sword" + name).skill_level;
        else if (Property_Controller.my_Property.career == Career.Magician)
        {
            GameObject temp       = transform.Find("MP").gameObject;
            UILabel    temp_label = temp.GetComponent <UILabel>();
            temp_label.text = Skill_Register.GetSkill("MagicSkill" + (DescriptionShow.current_click + 1)).mp_use + " mp";

            temp            = transform.Find("CD").gameObject;
            temp_label      = temp.GetComponent <UILabel>();
            temp_label.text = Skill_Register.GetSkill("MagicSkill" + (DescriptionShow.current_click + 1)).cd + " seconds";

            temp            = transform.Find("Damage").gameObject;
            temp_label      = temp.GetComponent <UILabel>();
            temp_label.text = Skill_Register.GetSkill("MagicSkill" + (DescriptionShow.current_click + 1)).damage_des + " [FFFFFF]: [FF0000]" + Skill_Damage.Instance.GetDamage("SwordSkill" + (DescriptionShow.current_click + 1));;

            temp            = transform.Find("Description").gameObject;
            temp_label      = temp.GetComponent <UILabel>();
            temp_label.text = Skill_Register.GetSkill("MagicSkill" + (DescriptionShow.current_click + 1)).des;
        }
    }
コード例 #9
0
    void SkillInit()
    {
        Skill_Register.GetSkill("SwordSkill1").effect = Blink;
        Skill_Register.GetSkill("SwordSkill2").effect = Strike;
        Skill_Register.GetSkill("SwordSkill3").effect = FlameOpen;
        Skill_Register.GetSkill("SwordSkill4").effect = Ultimate;

        Skill_Register.GetSkill("MagicSkill1").effect = Bomb;
        Skill_Register.GetSkill("MagicSkill2").effect = Lightning;
        Skill_Register.GetSkill("MagicSkill3").effect = Orb;
        Skill_Register.GetSkill("MagicSkill4").effect = Shackles;

        for (int i = 0; i < sword_skill_num; i++)
        {
            cd[i] = 0;
            cd[i] = 0;
        }
    }
コード例 #10
0
    public void lv()
    {
        if (Property_Controller.my_Property == null)
        {
            return;
        }
        UILabel label = GetComponent <UILabel>();

        if (Property_Controller.my_Property.career == Career.Swordman)
        {
            label.text = "Lv" + Skill_Register.GetSkill("Sword" + name).skill_level;
        }
        else if (Property_Controller.my_Property.career == Career.Magician)
        {
            Debug.Log(Skill_Register.GetSkill("Magic" + name));
            label.text = "Lv" + Skill_Register.GetSkill("Magic" + name).skill_level;
        }
    }
コード例 #11
0
    public void Ultimate()
    {
        int _mp = Skill_Register.GetSkill("SwordSkill4").mp_use;

        cols = Physics.OverlapSphere(character.transform.position + character.transform.forward * 3, 3f);
        if (Property_Controller.Instance.Get_CurrentMP() >= _mp &&
            TargetExist() &&
            cd[2] <= 0)
        {
            used_skill = true;
            cd[2]      = Skill_Register.GetSkill("SwordSkill4").cd;
            Property_Controller.Instance.Change_CurrentMP(-_mp);

            int i;
            animator.SetTrigger("ultimate_trigger");

            Invoke("CallSkyfire", 0.1f);
            Invoke("UltimateDamage", 0.1f);
            Invoke("CallSkyfire", 0.2f);
            for (i = 0; i < 5; i++)
            {
                Invoke("CallSkyfire", 0.5f);
            }
            Invoke("UltimateDamage", 0.5f);
            Invoke("CallSkyfire", 0.6f);
            Invoke("CallSkyfire", 0.75f);
            Invoke("CallSkyfire", 0.8f);
            for (i = 0; i < 5; i++)
            {
                Invoke("CallSkyfire", 1f);
            }
            Invoke("UltimateDamage", 1f);
            for (i = 0; i < 10; i++)
            {
                Invoke("CallSkyfire", 1.6f);
            }
            Invoke("UltimateDamage", 1.6f);
        }
    }
コード例 #12
0
    public void Missile()
    {
        int _mp = Skill_Register.GetSkill("MagicSkill4").mp_use;

        if (Property_Controller.Instance.Get_CurrentMP() >= _mp &&
            cd[3] <= 0)
        {
            used_skill = true;
            Property_Controller.Instance.Change_CurrentMP(-_mp);
            cd[3] = Skill_Register.GetSkill("MagicSkill4").cd;
            Ray        ray = new Ray(character.transform.position - character.transform.forward + Vector3.up, character.transform.forward);
            RaycastHit hit;

            for (int i = 0; i < 6; i++)
            {
                ray = new Ray(character.transform.position - character.transform.forward + Vector3.up, character.transform.forward + i * 0.1f * character.transform.right);
                if (Physics.Raycast(ray, out hit, 20f))
                {
                    Debug.DrawLine(ray.origin, hit.point, Color.red, 10);
                    if (hit.collider.gameObject.tag == "monster")
                    {
                        hit.collider.gameObject.GetComponent <Monster_Manage>().Monster_Manage_Change_Hp(-Property_Controller.Instance.Get_AD());
                        break;
                    }
                }
                ray = new Ray(character.transform.position - character.transform.forward + Vector3.up, character.transform.forward - i * 0.1f * character.transform.right);
                if (Physics.Raycast(ray, out hit, 20f))
                {
                    Debug.DrawLine(ray.origin, hit.point, Color.red, 10);
                    if (hit.collider.gameObject.tag == "monster")
                    {
                        hit.collider.gameObject.GetComponent <Monster_Manage>().Monster_Manage_Change_Hp(-Property_Controller.Instance.Get_AD());
                        break;
                    }
                }
            }
        }
    }
コード例 #13
0
    public void Strike()
    {
        int _mp = Skill_Register.GetSkill("SwordSkill2").mp_use;

        cols = Physics.OverlapSphere(character.transform.position + character.transform.forward * 3, 3f);
        if (Property_Controller.Instance.Get_CurrentMP() >= _mp &&
            TargetExist() &&
            cd[1] <= 0)
        {
            used_skill = true;
            cd[1]      = Skill_Register.GetSkill("SwordSkill2").cd;
            Property_Controller.Instance.Change_CurrentMP(-_mp);
            int i;
            character.transform.Find("Swordman_Body001").SendMessage("hide");
            character.transform.Find("Swordman_Sword").SendMessage("hide");
            animator.SetTrigger("strike_trigger");
            //GameObject child = character.transform.FindChild("Swordman_Body001")as GameObject;
            //GetComponentsInChildren<renderer>
            //if(child.renderer)
            //	child.renderer.material.color = new Color(renderer.material.color.r,renderer.material.color.g,renderer.material.color.b,0);
            for (i = 0; i < cols.Length; i++)
            {
                Debug.Log(cols[i].name);
                if (cols[i] != null && cols[i].tag == "monster")
                {
                    Instantiate(fen_shen, cols[i].transform.position - cols[i].transform.forward, cols[i].transform.rotation);
                    Monster_Manage monster = cols[i].GetComponent <Monster_Manage>();
                    monster.stop = true;
                    //Instantiate (slash_particle, cols[i].transform.position, cols[i].transform.rotation);
                    //Instantiate (slash_particle, cols[i].transform.position, cols[i].transform.rotation);
                }
            }
            Invoke("StrikeDone", 1.2f);
            Collider[] temp_cols = cols;
            StartCoroutine(StrikeDone2(temp_cols));
        }
    }
コード例 #14
0
    int Sword1()
    {
        int lv = Skill_Register.GetSkill("SwordSkill1").skill_level;

        return(5 + 3 * lv + 2 * ad);
    }
コード例 #15
0
    int Sword2()
    {
        int lv = Skill_Register.GetSkill("SwordSkill2").skill_level;

        return(20 + 8 * lv + 3 * ad);
    }
コード例 #16
0
    int Sword3()
    {
        int lv = Skill_Register.GetSkill("SwordSkill3").skill_level;

        return(12 + 5 * lv + 2 * ad);
    }
コード例 #17
0
    int Sword4()
    {
        int lv = Skill_Register.GetSkill("SwordSkill4").skill_level;

        return(8 + 3 * lv + (int)(0.1 * ad));
    }
コード例 #18
0
    int Magic1()
    {
        int lv = Skill_Register.GetSkill("MagicSkill1").skill_level;

        return(3 * lv + 2 * ap);
    }
コード例 #19
0
    int Magic2()
    {
        int lv = Skill_Register.GetSkill("MagicSkill2").skill_level;

        return(10 + 3 * lv + 3 * ap);
    }
コード例 #20
0
    int Magic4()
    {
        int lv = Skill_Register.GetSkill("MagicSkill4").skill_level;

        return(25 + 5 * lv + 3 * ap);
    }
コード例 #21
0
 // Update is called once per frame
 void Update()
 {
     mask.fillAmount = Skill.cd[skillName[skillName.Length - 1] - '1'] / Skill_Register.GetSkill(skillName).cd;
     //Debug.Log(Skill.cd[skillName[skillName.Length - 1] - '1']);
 }
コード例 #22
0
    void onclick(GameObject g)
    {
        if (btn2[g.name[14] - '0'] == null)
        {
            return;
        }
        if (btn2 [g.name [14] - '0'] == ("icon-null"))
        {
            return;
        }
        //Debug.Log("use " + (g.name[14] - '0') + " " + btn2[g.name[14] - '0']);
        if (tp [g.name [14] - '0'] == 2)
        {
            if (cd[g.name[14] - '0'] > 0)
            {
                return;
            }
            if (!Property_Controller.Instance.Get_Bag().Use(btn2 [g.name [14] - '0']))
            {
                for (int i = 1; i <= 5; i++)
                {
                    if (i != g.name [14] - '0')
                    {
                        if (btn2[i] != null)
                        {
                            if (btn2[i] == btn2 [g.name [14] - '0'])
                            {
                                btn2[i] = "icon-null";
                            }
                        }
                    }
                }
                btn2 [g.name [14] - '0'] = "icon-null";
            }
            for (int i = 1; i <= 5; i++)
            {
                if (btn2[i] != null && btn2 [g.name [14] - '0'] != "icon-null")
                {
                    if (btn2[i] == btn2 [g.name [14] - '0'])
                    {
                        cdt[i] = 0.8f;
                        cd[i]  = 1;
                    }
                }
            }
            if (UI_manager.m_BagUI != null)
            {
                UI_manager.m_BagUI.GetComponent <BagManager>().refresh();
            }
        }
        else
        {
            Debug.Log(cd[g.name [14] - '0']);
            if (cd[g.name [14] - '0'] > 0)
            {
                return;
            }
            //Debug.Log(123);

            /*
             * if (btn2[g.name[14] - '0'].Equals("skill-01"))
             * {
             *  cd[g.name[14] - '0'] = Skill.blink_cd;
             *  cdt[g.name[14] - '0'] = Skill.blink_cd;
             * }
             * if (btn2[g.name[14] - '0'].Equals("skill-02"))
             * {
             *  cd[g.name[14] - '0'] = Skill.strike_cd;
             *  cdt[g.name[14] - '0'] = Skill.strike_cd;
             * }
             * if (btn2[g.name[14] - '0'].Equals("skill-03"))
             * {
             *  cd[g.name[14] - '0'] = Skill.ultimate_cd;
             *  cdt[g.name[14] - '0'] = Skill.ultimate_cd;
             *  Debug.Log(cdt[g.name[14] - '0']);
             * }
             */
            cdtt = Skill_Register.GetSkill(btn2[g.name[14] - '0']).cd;
            //cd[g.name[14] - '0'] = 1;
            Skill_Register.DoSkill(btn2[g.name [14] - '0']);
            used = btn2[g.name [14] - '0'];
            // Debug.Log(42324242342);
        }
    }
コード例 #23
0
    int Magic3()
    {
        int lv = Skill_Register.GetSkill("MagicSkill3").skill_level;

        return(5 + 3 * lv + 1 * ap);
    }