Esempio n. 1
0
 public override void ECasting()
 {
     isSkillIng  = true;
     skillselect = SSelect.none;
     TheSplatManager.Cancel();
     TheChampionData.UsedE();
     HitEffectRPC("Mundo", "E");
     E();
     SkillEnd(0f);
 }
Esempio n. 2
0
 public override void ECasting()
 {
     isSkillIng  = true;
     skillselect = SSelect.E;
     for (int i = 0; i < 10; ++i)
     {
         Invoke("E", 0.5f * i);
     }
     SkillEnd(5);
     TheChampionData.UsedE();
 }
Esempio 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;
        }
    }
Esempio n. 4
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;
                    }
                }
            }
        }
    }