Exemple #1
0
 public override void WCasting()
 {
     isSkillIng  = true;
     skillselect = SSelect.none;
     TheSplatManager.Cancel();
     HitEffectRPC("Mundo", "W");
     TheChampionData.UsedW();
     W();
     SkillEnd(0f);
 }
Exemple #2
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;
        }
    }
Exemple #3
0
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {//스킬선택해제
            TheSplatManager.Cancel();
            InitTempValue();
            skillselect = SSelect.none;
            isSkillIng  = false;
        }
        if (skillselect.Equals(SSelect.W))
        {
            if (Input.GetMouseButtonDown(0))
            {
                Ray          ray = Camera.main.ScreenPointToRay(Input.mousePosition);
                RaycastHit[] r   = Physics.RaycastAll(ray, 280);
                foreach (RaycastHit rc in r)
                {//미니언일때부터 분류. 챔피언은 나중에 추가
                    if (rc.transform.tag.Equals("Minion"))
                    {
                        if (Vector3.Distance(transform.position, rc.transform.position) <= TheSplatManager.Point.Range)
                        {
                            isSkillIng = true;
                            TheSplatManager.Cancel();
                            TheAIPath.isStopped = true;
                            TempObject1         = rc.transform.gameObject;
                            TempVector1         = transform.position;
                            TempVector2         = rc.transform.position;
                            TheChampionData.UsedW();
                            transform.DOMove(TempVector2, 0.1f);
                            Invoke("W", 0.1f);

                            SkillEnd(0.1f);
                            break;
                        }
                    }
                }
            }
        }
    }
Exemple #4
0
    private void Update()
    {
        if (Input.GetMouseButtonDown(1) || Input.GetKeyDown(KeyCode.Escape))
        {//스킬선택해제
            TheSplatManager.Cancel();
            InitTempValue();
            skillselect = SSelect.none;
            isSkillIng  = false;
        }
        if (skillselect.Equals(SSelect.W))
        {
            if (Input.GetMouseButtonDown(0))
            {
                Ray          ray          = Camera.main.ScreenPointToRay(Input.mousePosition);
                int          layerMask    = (-1) - ((1 << LayerMask.NameToLayer("WallCollider")));
                RaycastHit[] r            = Physics.RaycastAll(ray, 280, layerMask);
                bool         isEnemyClick = false;
                foreach (RaycastHit rc in r)
                {//미니언일때부터 분류. 챔피언은 나중에 추가
                    //if (rc.transform.tag.Equals("Minion") || rc.collider.gameObject.layer.Equals(LayerMask.NameToLayer("Champion")))
                    if (rc.transform.tag.Equals("Minion"))
                    {
                        if (!rc.transform.name.Contains(TheChampionBehaviour.Team))
                        {
                            if (rc.transform.GetComponent <FogOfWarEntity>().isCanTargeting)
                            {
                                isEnemyClick = true;
                            }
                        }
                    }
                    else if (rc.collider.gameObject.layer.Equals(LayerMask.NameToLayer("Champion")))
                    {
                        if (!rc.transform.GetComponent <ChampionBehavior>().Team.Equals(TheChampionBehaviour.Team))
                        {
                            if (rc.transform.GetComponent <FogOfWarEntity>().isCanTargeting)
                            {
                                isEnemyClick = true;
                            }
                        }
                    }
                    else if (rc.collider.gameObject.layer.Equals(LayerMask.NameToLayer("Monster")))
                    {
                        if (rc.transform.GetComponent <FogOfWarEntity>().isCanTargeting)
                        {
                            isEnemyClick = true;
                        }
                    }
                    if (isEnemyClick)
                    {
                        if (Vector3.Distance(transform.position, rc.transform.position) <= TheSplatManager.Point.Range)
                        {
                            isSkillIng = true;
                            TheSplatManager.Cancel();
                            TheAIPath.isStopped = true;
                            TempObject1         = rc.transform.gameObject;
                            TempVector1         = transform.position;
                            TempVector2         = rc.transform.position;
                            TheChampionData.UsedW();
                            transform.DOLookAt(TempVector2, 0.1f);
                            transform.DOMove(TempVector2, 0.1f);
                            Invoke("W", 0.1f);

                            SkillEnd(0.1f);
                            break;
                        }
                    }
                    else
                    {
                        TheSplatManager.Cancel();
                        InitTempValue();
                        skillselect = SSelect.none;
                        isSkillIng  = false;
                    }
                }
            }
        }
    }
Exemple #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;
                    }
                }
            }
        }
    }