Ejemplo n.º 1
0
    public override void RCasting()
    {
        //HitEffectRPC("Alistar", "R", 14, 0.5f);
        //for (int i = 0; i < 14; ++i)
        //    Invoke("R", 0.5f * i);
        //한개로 나오게 바꿈
        HitEffectRPC("Alistar", "R", 1, 0.5f);
        Invoke("R", 0.5f);
        TheChampionData.UsedR();
        switch (TheChampionData.skill_R)
        {
        case 1: rSkillTempVal = 122; break;     //55% -> 45 = 10000/(100+x) -> x = 1100/9 = 122.2222222222

        case 2: rSkillTempVal = 186; break;     //65% -> 35 = 10000/(100+x) -> x = 1300/7 = 185.7142857142

        case 3: rSkillTempVal = 300; break;     //75% -> 25 = 10000/(100+x) -> x = 300
        }
        TheChampionData.totalstat.Ability_Def += rSkillTempVal;
        TheChampionData.totalstat.Attack_Def  += rSkillTempVal;
        if (!TheUIStat)
        {
            FindUICanvas();
        }
        TheUIStat.Refresh();
        Invoke("DownDefence", 7f);
    }
Ejemplo n.º 2
0
 public override void RCasting()
 {
     isSkillIng  = true;
     skillselect = SSelect.none;
     TheSplatManager.Cancel();
     HitEffectRPC("Mundo", "R");
     TheChampionData.UsedR();
     R();
     SkillEnd(0f);
 }
Ejemplo n.º 3
0
    /// <summary>
    /// ChampionData에 스킬을 사용했음을 알리는 함수
    /// </summary>
    /// <param name="skillKey">사용한 스킬 단축키("Q", "W", "E", "R")</param>
    private void CallChampDataUsedSkill(string skillKey)
    {
        switch (skillKey)
        {
        case "Q": TheChampionData.UsedQ(); break;

        case "W": TheChampionData.UsedW(); break;

        case "E": TheChampionData.UsedE(); break;

        case "R": TheChampionData.UsedR(); break;
        }
    }
Ejemplo n.º 4
0
    public override void RCasting()
    {
        for (int i = 0; i < 14; ++i)
        {
            Invoke("R", 0.5f * i);
        }
        TheChampionData.UsedR();
        switch (TheChampionData.skill_R)
        {
        case 1: rSkillTempVal = 122; break;     //55% -> 45 = 10000/(100+x) -> x = 1100/9 = 122.2222222222

        case 2: rSkillTempVal = 186; break;     //65% -> 35 = 10000/(100+x) -> x = 1300/7 = 185.7142857142

        case 3: rSkillTempVal = 300; break;     //75% -> 25 = 10000/(100+x) -> x = 300
        }
        TheChampionData.mystat.Ability_Def += rSkillTempVal;
        TheChampionData.mystat.Attack_Def  += rSkillTempVal;
        TheUIStat.Refresh();
        Invoke("DownDefence", 7f);
    }
Ejemplo n.º 5
0
    private void Update()
    {
        if (IAmAshe == null)
        {
            if (gameObject.tag.Equals("Player"))
            {
                IAmAshe = true;
            }
            else
            {
                IAmAshe = false;
            }
        }
        if (IAmAshe == true)
        {
            if (beforeELv.Equals(0))
            {
                if (TheChampionData.skill_E > 0)
                {
                    if (TheStackImage == null)
                    {
                        TheStackImage = GameObject.FindGameObjectWithTag("StackImage").GetComponent <StackImage>();
                    }
                    beforeELv = 1;
                    if (AsheHawkCount > 0)
                    {
                        TheStackImage.ImageDic["AsheE"].gameObject.SetActive(true);
                        TheStackImage.TextDic["AsheE"].text = AsheHawkCount.ToString();
                    }
                }
            }
        }
        if (TheChampionData.skill_Q > 0)
        {
            if (TheStackImage == null)
            {
                TheStackImage = GameObject.FindGameObjectWithTag("StackImage").GetComponent <StackImage>();
            }
            if (isQ)
            {
                qTIme -= Time.deltaTime;
                if (qTIme <= 0)
                {
                    isQ   = false;
                    qTIme = 4f;
                    if (photonView.isMine)
                    {
                        TheChampionData.skillPlusAtkDam = 0;
                        TheChampionData.TotalStatDamDefUpdate();
                        TheChampionData.UIStat.Refresh();
                    }
                    QSkillObj.SetActive(false);
                }
            }
            else if (qStackCount > 0)
            {
                keepQStackTime -= Time.deltaTime;
                if (keepQStackTime < 0)
                {
                    reduceQStackTime -= Time.deltaTime;
                    if (reduceQStackTime < 0)
                    {
                        --qStackCount;
                        if (IAmAshe == true)
                        {
                            if (qStackCount.Equals(0))
                            {
                                TheStackImage.TextDic["AsheQ"].text = "";
                                TheStackImage.ImageDic["AsheQ"].gameObject.SetActive(false);
                            }
                            else
                            {
                                TheStackImage.TextDic["AsheQ"].text = qStackCount.ToString();
                            }
                        }
                        reduceQStackTime = 0.75f;
                    }
                }
            }
        }
        if (TheChampionData.skill_E > 0 && AsheHawkCount < 2)
        {
            AsheHawkChargeTime -= Time.deltaTime;
            if (AsheHawkChargeTime < 0)
            {
                AsheHawkChargeTime = 100 - (TheChampionData.skill_E * 10);
                ++AsheHawkCount;
                if (IAmAshe == true)
                {
                    if (AsheHawkCount.Equals(1))
                    {
                        TheStackImage.ImageDic["AsheE"].gameObject.SetActive(true);
                    }
                    TheStackImage.TextDic["AsheE"].text = AsheHawkCount.ToString();
                }
            }
        }
        if (Input.GetMouseButtonDown(1) || Input.GetKeyDown(KeyCode.Escape))
        {//스킬선택해제
            CancelSkill();
        }
        if (skillselect.Equals(SSelect.E))
        {
            if (Input.GetMouseButtonDown(0))
            {
                skillselect = SSelect.none;
                Vector3      h    = Vector3.zero;
                Vector3      v    = Input.mousePosition;
                Ray          r    = Camera.main.ScreenPointToRay(v);
                RaycastHit[] hits = Physics.RaycastAll(r, 50f);

                TempVector1 = Vector3.zero;
                foreach (RaycastHit hit in hits)
                {
                    if (hit.collider.tag.Equals("Terrain"))
                    {
                        isSkillIng = true;
                        TheSplatManager.Cancel();
                        TheChampionData.UsedE();
                        TempVector1   = hit.point;
                        TempVector1.y = 0.5f;
                        Invoke("E", 0.1f);

                        championAnimation.AnimationApply("E", true);
                        championAnimation.AnimationApply("E", false, 0.7f);
                        break;
                    }
                }
            }
        }
        if (skillselect.Equals(SSelect.R))
        {
            if (Input.GetMouseButtonDown(0))
            {
                skillselect = SSelect.none;
                if (audio != null)
                {
                    ChampionSound.instance.Skill(PlayerData.Instance.championName, 3, audio);
                }
                Vector3      h    = Vector3.zero;
                Vector3      v    = Input.mousePosition;
                Ray          r    = Camera.main.ScreenPointToRay(v);
                RaycastHit[] hits = Physics.RaycastAll(r, 50f);

                TempVector1 = Vector3.zero;
                foreach (RaycastHit hit in hits)
                {
                    if (hit.collider.tag.Equals("Terrain"))
                    {
                        isSkillIng = true;
                        TheSplatManager.Cancel();
                        TheChampionData.UsedR();
                        TempVector1   = hit.point;
                        TempVector1.y = 0.5f;
                        Invoke("R", 0.1f);

                        championAnimation.AnimationApply("R", true);
                        championAnimation.AnimationApply("R", false, 0.8f);
                        break;
                    }
                }
            }
        }
        if (skillselect.Equals(SSelect.W))
        {
            if (Input.GetMouseButtonDown(0))
            {
                skillselect = SSelect.none;
                Vector3      h    = Vector3.zero;
                Vector3      v    = Input.mousePosition;
                Ray          r    = Camera.main.ScreenPointToRay(v);
                RaycastHit[] hits = Physics.RaycastAll(r, 50f);
                TempVector1 = Vector3.zero;
                foreach (RaycastHit hit in hits)
                {
                    if (hit.collider.tag.Equals("Terrain"))
                    {
                        isSkillIng = true;
                        TheSplatManager.Cancel();
                        TheChampionData.UsedW();
                        TempVector1   = hit.point;
                        TempVector1.y = 0.5f;
                        Invoke("W", 0.1f);

                        championAnimation.AnimationApply("W", true);
                        championAnimation.AnimationApply("W", false, 0.8f);
                        break;
                    }
                }
            }
        }
    }