예제 #1
0
파일: MundoSkill.cs 프로젝트: kunana/AOS
 public override void CancelSkill()
 {
     TheSplatManager.Cancel();
     InitTempValue();
     skillselect = SSelect.none;
     isSkillIng  = false;
 }
예제 #2
0
파일: MundoSkill.cs 프로젝트: kunana/AOS
 public override void QCasting()
 {
     isSkillIng  = true;
     skillselect = SSelect.Q;
     TheSplatManager.Direction.Select();
     TheSplatManager.Direction.Scale = 25f;
 }
예제 #3
0
 public override void QCasting()
 {
     isSkillIng  = true;
     skillselect = SSelect.none;
     TheSplatManager.Cancel();
     Q();
     TheChampionData.UsedQ();
     SkillEnd(1f);
 }
예제 #4
0
파일: AsheSkill.cs 프로젝트: kunana/AOS
 public override void ECasting()
 {
     if (AsheHawkCount > 0)
     {
         isSkillIng  = true;
         skillselect = SSelect.E;
         TheSplatManager.Cancel();
     }
 }
예제 #5
0
 public override void WCasting()
 {
     if (skillselect != SSelect.W)
     {
         skillselect = SSelect.W;
         TheSplatManager.Point.Select();
         TheSplatManager.Point.Scale = 14f;
         TheSplatManager.Point.Range = 14f;
     }
 }
예제 #6
0
파일: MundoSkill.cs 프로젝트: kunana/AOS
 public override void RCasting()
 {
     isSkillIng  = true;
     skillselect = SSelect.none;
     TheSplatManager.Cancel();
     HitEffectRPC("Mundo", "R");
     TheChampionData.UsedR();
     R();
     SkillEnd(0f);
 }
예제 #7
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();
 }
예제 #8
0
 public override void QCasting()
 {
     isSkillIng  = true;
     skillselect = SSelect.none;
     TheSplatManager.Cancel();
     HitEffectRPC("Alistar", "Q");
     Q();
     TheChampionData.UsedQ();
     SkillEnd(1f);
     championAnimation.AnimationApply("Q", true);
     championAnimation.AnimationApply("Q", false, 0.7f);
 }
예제 #9
0
    public override void W()
    {
        base.W();
        InitTempValue();
        OnMove();
        GameObject obj = SkillObj["W"][0];

        if (obj.activeInHierarchy)
        {
            Pooling(QSkillprefab, "W", 10);
            obj = SkillObj["W"][0];
        }
        SkillObj["W"].RemoveAt(0);
        SkillObj["W"].Add(obj);
        obj.transform.position = transform.position;
        obj.SetActive(true);
        if (TempObject1.tag.Equals("Minion"))
        {
            MinionAtk mA = TempObject1.GetComponent <MinionBehavior>().minAtk;
            mA.PushMe(Vector3.up * 3 + TempObject1.transform.position
                      + (((TempObject1.transform.position - TempVector1).normalized) * 5), 0.5f);
            mA.PauseAtk(1f, true);
            float damage = skillData.wDamage[TheChampionData.skill_W - 1]
                           + Acalculate(skillData.wAstat, skillData.wAvalue);
            if (TempObject1.GetComponent <MinionBehavior>().HitMe(damage, "AP"))
            {
                //여기에는 나중에 평타 만들면 플레이어의 현재 공격 타겟이 죽었을 시 초기화해주는 것을 넣자.
                TheChampionAtk.ResetTarget();
            }
        }
        else if (TempObject1.tag.Equals("Player"))
        {
            ChampionAtk cA = TempObject1.GetComponent <ChampionBehavior>().myChampAtk;
            cA.PushMe(Vector3.up * 3 + TempObject1.transform.position
                      + (((TempObject1.transform.position - TempVector1).normalized) * 5), 0.5f);
            cA.PauseAtk(1f, true);
            float damage = skillData.wDamage[TheChampionData.skill_W - 1]
                           + Acalculate(skillData.wAstat, skillData.wAvalue);
            if (TempObject1.GetComponent <ChampionBehavior>().HitMe(damage, "AP"))
            {
                //여기에는 나중에 평타 만들면 플레이어의 현재 공격 타겟이 죽었을 시 초기화해주는 것을 넣자.
                TheChampionAtk.ResetTarget();
            }
        }
        skillselect = SSelect.none;
    }
예제 #10
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;
                        }
                    }
                }
            }
        }
    }
예제 #11
0
 private void OffIsSkillIng()
 {
     skillselect = SSelect.none;
     isSkillIng  = false;
 }
예제 #12
0
    public override void W()
    {
        InitTempValue();
        OnMove();
        HitEffectRPC("Alistar", "W");
        GameObject obj = SkillObj["W"][0];

        if (obj.activeInHierarchy)
        {
            Pooling(QSkillprefab, "W", 10);
            obj = SkillObj["W"][0];
        }
        SkillObj["W"].RemoveAt(0);
        SkillObj["W"].Add(obj);
        obj.transform.position = transform.position;
        obj.SetActive(true);
        if (TempObject1.tag.Equals("Minion"))
        {
            MinionBehavior mB = TempObject1.GetComponent <MinionBehavior>();
            if (!TempObject1.gameObject.name.Contains(TheChampionBehaviour.Team))
            {
                MinionAtk mA = mB.minAtk;
                //mA.PushMe(Vector3.up * 3 + TempObject1.transform.position
                //    + (((TempObject1.transform.position - TempVector1).normalized) * 5), 0.5f);
                Vector3 direction = (TempObject1.transform.position - TempVector1).normalized;
                Vector3 v         = TempObject1.transform.position
                                    + (direction * 10);;
                RaycastHit hit;
                if (Physics.Raycast(mA.transform.position, direction, out hit, 12, 1 << LayerMask.NameToLayer("WallCollider")))
                {
                    float dis = Vector3.Distance(hit.point, TempObject1.transform.position);
                    v = TempObject1.transform.position
                        + (direction * (dis - 1f));
                }

                v.y = 0;
                mA.PushMe(v, 0.5f);
                mA.PauseAtk(1f, true);
                float damage = skillData.wDamage[TheChampionData.skill_W - 1]
                               + Acalculate(skillData.wAstat, skillData.wAvalue);

                if (mB != null)
                {
                    int viewID = mB.GetComponent <PhotonView>().viewID;
                    HitRPC(viewID, damage, "AP", "Push");
                    if (mB.HitMe(damage, "AP", gameObject))
                    {
                        //여기에는 나중에 평타 만들면 플레이어의 현재 공격 타겟이 죽었을 시 초기화해주는 것을 넣자.
                        TheChampionAtk.ResetTarget();

                        // 스킬쏜애 주인이 나면 킬올리자
                        if (GetComponent <PhotonView>().owner.Equals(PhotonNetwork.player))
                        {
                            TheChampionData.Kill_CS_Gold_Exp(TempObject1.gameObject.name, 1, TempObject1.transform.position);
                        }
                    }
                }
            }
        }
        //else if (TempObject1.tag.Equals("Player"))
        else if (TempObject1.layer.Equals(LayerMask.NameToLayer("Champion")))
        {
            ChampionBehavior cB = TempObject1.GetComponent <ChampionBehavior>();
            if (cB.Team != TheChampionBehaviour.Team)
            {
                ChampionAtk cA        = cB.myChampAtk;
                Vector3     direction = (TempObject1.transform.position - TempVector1).normalized;
                Vector3     v         = TempObject1.transform.position
                                        + (direction * 5);;
                RaycastHit hit;
                if (Physics.Raycast(cA.transform.position, direction, out hit, 6, 1 << LayerMask.NameToLayer("WallCollider")))
                {
                    float dis = Vector3.Distance(hit.point, TempObject1.transform.position);
                    v = TempObject1.transform.position
                        + (direction * (dis - 1f));
                }

                v.y = 0.5f;
                cA.PushMe(v, 0.5f);
                cA.PauseAtk(1f, true);
                float damage = skillData.wDamage[TheChampionData.skill_W - 1]
                               + Acalculate(skillData.wAstat, skillData.wAvalue);

                if (cB != null)
                {
                    int viewID = cB.GetComponent <PhotonView>().viewID;
                    HitRPC(viewID, damage, "AP", "Push");
                    if (cB.HitMe(damage, "AP", gameObject, gameObject.name))
                    {
                        TheChampionAtk.ResetTarget();
                        if (!sysmsg)
                        {
                            sysmsg = GameObject.FindGameObjectWithTag("SystemMsg").GetComponent <SystemMessage>();
                        }
                        //sysmsg.sendKillmsg("alistar", TempObject1.GetComponent<ChampionData>().ChampionName, TheChampionBehaviour.Team.ToString());
                        // 스킬쏜애 주인이 나면 킬올리자
                        //if (GetComponent<PhotonView>().owner.Equals(PhotonNetwork.player))
                        //{

                        //    TheChampionData.Kill_CS_Gold_Exp(TempObject1.gameObject.name, 0, TempObject1.transform.position);
                        //}
                    }
                }
            }
        }
        else if (TempObject1.layer.Equals(LayerMask.NameToLayer("Monster")))
        {
            MonsterBehaviour mB        = TempObject1.GetComponent <MonsterBehaviour>();
            MonsterAtk       mA        = mB.monAtk;
            Vector3          direction = (TempObject1.transform.position - TempVector1).normalized;
            Vector3          v         = TempObject1.transform.position
                                         + (direction * 5);;
            RaycastHit hit;
            if (Physics.Raycast(mA.transform.position, direction, out hit, 6, 1 << LayerMask.NameToLayer("WallCollider")))
            {
                float dis = Vector3.Distance(hit.point, TempObject1.transform.position);
                v = TempObject1.transform.position
                    + (direction * (dis - 1f));
            }

            v.y = 0;
            mA.PushMe(v, 0.5f);
            mA.PauseAtk(1f, true);
            float damage = skillData.wDamage[TheChampionData.skill_W - 1]
                           + Acalculate(skillData.wAstat, skillData.wAvalue);

            if (mB != null)
            {
                int viewID = mB.GetComponent <PhotonView>().viewID;
                HitRPC(viewID, damage, "AP", "Push");
                if (mB.HitMe(damage, "AP", gameObject))
                {
                    TheChampionAtk.ResetTarget();

                    //// 스킬쏜애 주인이 나면 킬올리자
                    //if (GetComponent<PhotonView>().owner.Equals(PhotonNetwork.player))
                    //{
                    //    TheChampionData.Kill_CS_Gold_Exp(TempObject1.gameObject.name, 3, TempObject1.transform.position);
                    //}
                }
            }
        }
        skillselect = SSelect.none;
    }
예제 #13
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;
                    }
                }
            }
        }
    }
예제 #14
0
파일: MundoSkill.cs 프로젝트: kunana/AOS
    private void Update()
    {
        if (Input.GetMouseButtonDown(1) || Input.GetKeyDown(KeyCode.Escape))
        {//스킬선택해제
            CancelSkill();
        }
        if (skillselect.Equals(SSelect.Q))
        {
            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.UsedQ();
                        TempVector1   = hit.point;
                        TempVector1.y = 0.5f;

                        championAnimation.AnimationApply("Q", true);
                        championAnimation.AnimationApply("Q", false, 0.5f);

                        Invoke("Q", 0.2f);
                        break;
                    }
                }
            }
        }
        if (isW)
        {
            wTime -= Time.deltaTime;
            if (wTime < 0)
            {
                //if (Input.GetKeyDown(KeyCode.W))
                //{
                //    HitEffectRPC("Mundo", "W");
                //    WSkillObj.SetActive(false);
                //    SkillEnd(0f);
                //    isW = false;
                //    wTime = 1;
                //    SkillEnd(0f);
                //}
                //else
                //{
                wTime += 1;
                if (TheChampionData.totalstat.Hp - 2 < TheChampionData.mana_W)
                {
                    HitEffectRPC("Mundo", "W");
                    WSkillObj.SetActive(false);
                    isW   = false;
                    wTime = 1;
                    SkillEnd(0f);
                }
                else
                {
                    TheChampionData.totalstat.Hp -= TheChampionData.mana_W;
                }
            }
        }
        if (isE)
        {
            if (photonView.isMine)
            {
                eTime -= Time.deltaTime;
                float losedHpPercent = ((TheChampionData.totalstat.MaxHp - TheChampionData.totalstat.Hp) / TheChampionData.totalstat.MaxHp);
                float minimalSkillAD = skillData.eDamage[TheChampionData.skill_E - 1] / 2f;
                TheChampionData.skillPlusAtkDam = minimalSkillAD + (minimalSkillAD * losedHpPercent);
                if (TheChampionAtk.skillKey.Equals("MundoE") && TheChampionAtk.skillKeyNum > 0)
                {
                    int e = TheChampionData.skill_E - 1;
                    TheChampionData.skillPlusAtkDam += TheChampionData.totalstat.MaxHp * (0.03f + (float)e * 0.005f);
                }
                TheChampionData.skillPlusAtkDam = Mathf.Round(TheChampionData.skillPlusAtkDam);
                if (eTime <= 0)
                {
                    HitEffectRPC("Mundo", "E");
                    E();
                }
                TheChampionData.TotalStatDamDefUpdate();
                TheChampionData.UIStat.Refresh();
            }
        }
        if (isR)
        {
            if (photonView.isMine)
            {
                if (TheChampionBehaviour.isDead)
                {
                    RSkillObj.SetActive(false);
                    TheChampionData.totalstat.Hp = 0;
                    ChampionSound.instance.TempAudio.Stop();
                    ChampionSound.instance.TempAudio.loop = false;
                    ChampionSound.instance.TempAudio.clip = null;
                    if (photonView.isMine)
                    {
                        TheChampionData.skillPlusSpeed = 0;
                        TheChampionData.TotalStatSpeedUpdate();
                        TheChampionData.UIStat.Refresh();
                    }
                    return;
                }
                rTime -= Time.deltaTime;
                if (rTime <= 0)
                {
                    rTime = 1f;
                    TheChampionData.totalstat.Hp += rHealValue;
                    if (--rCount == 0)
                    {
                        HitEffectRPC("Mundo", "R");
                        R();
                    }
                }
            }
        }
    }
예제 #15
0
파일: AsheSkill.cs 프로젝트: kunana/AOS
 public override void WCasting()
 {
     isSkillIng  = true;
     skillselect = SSelect.W;
     TheSplatManager.Cone.Select();
 }
예제 #16
0
파일: AsheSkill.cs 프로젝트: kunana/AOS
    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;
                    }
                }
            }
        }
    }