/// <summary> /// 사망처리를 하는 함수 /// </summary> private void Dead() { InitMinionStatus(); minHP.InitProgressBar(); if (minAtk == null) { minAtk = transform.GetComponentInChildren <MinionAtk>(); } if (TheAIDest == null) { TheAIDest = gameObject.GetComponent <AIDestinationSetter>(); } if (TheAIPath == null) { TheAIPath = gameObject.GetComponent <AIPath>(); } minAtk.TheAIPath = null; minAtk.moveTarget = null; minAtk.nowTarget = null; minAtk.StopAllCoroutines(); TheAIPath.canMove = true; TheAIPath.canSearch = true; gameObject.SetActive(false); gameObject.GetComponent <AIDestinationSetter>().target = null; // 죽을 때 마우스 바뀐 상태면 원래대로 돌림 if (isMouseChanged) { cursor.SetCursor(cursor.PreCursor, Vector2.zero); } }
private void OnTriggerEnter(Collider other) { if (other.gameObject.tag.Equals("Minion")) { MinionAtk mA = other.GetComponent <MinionBehavior>().minAtk; if (!mA.isPushing) { return; } mA.PushWall(); } else if (other.gameObject.layer.Equals(LayerMask.NameToLayer("Champion"))) { ChampionAtk cA = other.GetComponent <ChampionBehavior>().myChampAtk; if (!cA.isPushing) { return; } cA.PushWall(); } else if (other.gameObject.layer.Equals(LayerMask.NameToLayer("Monster"))) { MonsterAtk mA = other.GetComponent <MonsterBehaviour>().monAtk; if (!mA.isPushing) { return; } mA.PushWall(); } }
private void Dead() { //ingameManager.minionDeadCount += 1; InitMinionStatus(); minHP.InitProgressBar(); if (minAtk == null) { minAtk = transform.GetComponentInChildren <MinionAtk>(); } if (TheAIDest == null) { TheAIDest = gameObject.GetComponent <AIDestinationSetter>(); } if (TheAIPath == null) { TheAIPath = gameObject.GetComponent <AIPath>(); } minAtk.TheAIPath = null; minAtk.MoveTarget = null; minAtk.nowTarget = null; minAtk.StopAllCoroutines(); TheAIPath.canMove = true; TheAIPath.canSearch = true; gameObject.SetActive(false); gameObject.GetComponent <AIDestinationSetter>().target = null; // 죽을때 마우스바뀐상태면 원래대로 if (mouseChanged) { cursor.SetCursor(cursor.PreCursor, Vector2.zero); } //gameObject.transform.position = deadVec + deadOffsetVec; }
private void OnTriggerEnter(Collider other) { if (other.tag.Equals("Minion")) //나중에챔피언일때도적일때도조건에추가 { //미니언의 경우 트리거 켜진건 공격 추-적 반경이라 디스턴스를 추가 //if (Vector3.Distance(other.transform.position, transform.position) <= skillRange) //{ MinionAtk mA = other.GetComponent <MinionBehavior>().minAtk; mA.PauseAtk(1f, true); //other.GetComponent<Rigidbody>().AddForce(0, upPower, 0); other.transform.DOJump(other.transform.position, 3, 1, 1f); float damage = mySkill.skillData.qDamage[mySkill.TheChampionData.skill_Q - 1] + mySkill.Acalculate(mySkill.skillData.qAstat, mySkill.skillData.qAvalue); //공격 코드(데미지 등) 삽입' //float damage = mySkill.QSkillInfo.myskill.Damage[mySkill.QSkillInfo.myskill.skillLevel] // + mySkill.QSkillInfo.Acalculate(mySkill.QSkillInfo.myskill.Astat, mySkill.QSkillInfo.myskill.Avalue); if (other.GetComponent <MinionBehavior>().HitMe(damage, "AP")) { //여기에는 나중에 평타 만들면 플레이어의 현재 공격 타겟이 죽었을 시 초기화해주는 것을 넣자. mySkill.TheChampionAtk.ResetTarget(); } } else if (other.tag.Equals("Player")) { ChampionAtk cA = other.GetComponent <ChampionBehavior>().myChampAtk; cA.PauseAtk(1f, true); other.transform.DOJump(other.transform.position, 3, 1, 1f); float damage = mySkill.skillData.qDamage[mySkill.TheChampionData.skill_Q - 1] + mySkill.Acalculate(mySkill.skillData.qAstat, mySkill.skillData.qAvalue); if (other.GetComponent <ChampionBehavior>().HitMe(damage, "AP")) { mySkill.TheChampionAtk.ResetTarget(); } } }
public bool HitMe(float damage = 0, string atkType = "AD") // AD, AP, FD(고정 데미지 = Fixed damage) { bool isDead = false; if (atkType.Equals("AD")) { damage = (damage * 100f) / (100f + stat.Attack_Def); } else if (atkType.Equals("AP")) { damage = (damage * 100f) / (100f + stat.Ability_Def); } stat.Hp -= damage; //print(stat.Hp); if (stat.Hp < 1) { stat.Hp = 0; IamDead(0.2f); if (minAtk == null) { minAtk = transform.GetComponentInChildren <MinionAtk>(); } minAtk.enemiesList.Clear(); isDead = true; } return(isDead); }
private void Dead() { //gameObject.GetComponent<GridData>().RemoveGridData(); if (minAtk == null) { minAtk = transform.GetComponentInChildren <MinionAtk>(); } if (TheAIDest == null) { TheAIDest = gameObject.GetComponent <AIDestinationSetter>(); } if (TheAIPath == null) { TheAIPath = gameObject.GetComponent <AIPath>(); } minAtk.TheAIPath = null; minAtk.MoveTarget = null; minAtk.nowTarget = null; minAtk.StopAllCoroutines(); TheAIPath.canMove = true; TheAIPath.canSearch = true; gameObject.SetActive(false); gameObject.GetComponent <AIDestinationSetter>().target = null; //gameObject.transform.position = deadVec + deadOffsetVec; }
private void Awake() { ingameManager = GameObject.FindGameObjectWithTag("InGameManager").GetComponent <InGameManager>(); mesh = GetComponentInChildren <SkinnedMeshRenderer>(); fog = GetComponent <FogOfWarEntity>(); minHP = transform.GetComponent <MinionHP>(); TheAIDest = gameObject.GetComponent <AIDestinationSetter>(); minAtk = transform.GetComponentInChildren <MinionAtk>(); Audio = GetComponentInChildren <AudioSource>(); Audio.minDistance = 1.0f; Audio.maxDistance = 10.0f; Audio.volume = 1f; Audio.spatialBlend = 0.5f; Audio.rolloffMode = AudioRolloffMode.Linear; if (minAtk == null) { print("minatk is null"); } TheAIPath = gameObject.GetComponent <AIPath>(); if (!cursor) { cursor = GameObject.FindGameObjectWithTag("MouseCursor").GetComponent <AOSMouseCursor>(); } }
private void OnTriggerEnter(Collider other) { if (!PhotonNetwork.isMasterClient) { return; } //웨이포인트에 진입한게 미니언인지 확인 if (other.tag.Equals("Minion")) { MinionAtk min = other.GetComponent <MinionBehavior>().minAtk; //미니언의 타겟이 웨이포인트인 경우, 각 팀에 따라 해당하는 웨이포인트로 이동 목표를 바꿔준다. if (other.name.Contains("Blue")) { bool isArriveWaypoint = false; if (min.nowTarget == null) { isArriveWaypoint = true; } else if (min.nowTarget.tag.Equals("WayPoint")) { isArriveWaypoint = true; } if (isArriveWaypoint) { min.nowTarget = RedPoint; other.GetComponent <AIDestinationSetter>().target = RedPoint.transform; } min.moveTarget = RedPoint; } else if (other.name.Contains("Red")) { bool isArriveWaypoint = false; if (min.nowTarget == null) { isArriveWaypoint = true; } else if (min.nowTarget.tag.Equals("WayPoint")) { isArriveWaypoint = true; } if (isArriveWaypoint) { min.nowTarget = BluePoint; other.GetComponent <AIDestinationSetter>().target = BluePoint.transform; } min.moveTarget = BluePoint; } } }
private void Awake() { TheAIDest = gameObject.GetComponent <AIDestinationSetter>(); minAtk = transform.GetComponentInChildren <MinionAtk>(); if (minAtk == null) { print("minatk is null"); } TheAIPath = gameObject.GetComponent <AIPath>(); }
public void CallDead(float time) { isDead = true; stat.Hp = 0; IamDead(time); NearExp(); if (minAtk == null) { minAtk = transform.GetComponentInChildren <MinionAtk>(); } minAtk.enemiesList.Clear(); }
private void InitTarget(GameObject minion, GameObject point) { MinionBehavior minB = minion.GetComponent <MinionBehavior>(); MinionAtk minAtk = minB.minAtk; if (minAtk == null) { minB.minAtk = minB.transform.GetComponentInChildren <MinionAtk>(); minAtk = minB.minAtk; } minion.GetComponent <AIDestinationSetter>().target = point.transform; minAtk.MoveTarget = point; minAtk.nowTarget = null; minion.GetComponent <MinionBehavior>().spawnPoint = point.transform.position; }
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; }
/// <summary> /// 해당 스크립트의 전체적인 기본 값을 설정하는 함수 /// </summary> private void Init() { ingameManager = GameObject.FindGameObjectWithTag("InGameManager").GetComponent <InGameManager>(); mesh = GetComponentInChildren <SkinnedMeshRenderer>(); fog = GetComponent <FogOfWarEntity>(); minHP = transform.GetComponent <MinionHP>(); minAtk = transform.GetComponentInChildren <MinionAtk>(); TheAIDest = gameObject.GetComponent <AIDestinationSetter>(); TheAIPath = gameObject.GetComponent <AIPath>(); if (!cursor) { cursor = GameObject.FindGameObjectWithTag("MouseCursor").GetComponent <AOSMouseCursor>(); } InitAudio(); }
private void Update() { if (stat != null) { if (stat.Hp < 1) { stat.Hp = 0; IamDead(0.2f); //NearExp(); if (minAtk == null) { minAtk = transform.GetComponentInChildren <MinionAtk>(); } minAtk.enemiesList.Clear(); } } }
private void Update() { if (stat != null) { //사망시 가지고 있던 타겟 리스트를 초기화 if (stat.Hp < 1) { stat.Hp = 0; if (minAtk == null) { minAtk = transform.GetComponentInChildren <MinionAtk>(); } minAtk.enemiesList.Clear(); } } }
private void OnTriggerEnter(Collider other) { if (!PhotonNetwork.isMasterClient) { return; } if (other.tag.Equals("Minion")) { MinionAtk min = other.GetComponent <MinionBehavior>().minAtk; //MinionAtk min = other.GetComponent<MinionAtk>(); if (other.name.Contains("Blue")) { if (min.nowTarget == null) { min.nowTarget = RedPoint; other.GetComponent <AIDestinationSetter>().target = RedPoint.transform; } else if (min.nowTarget.tag.Equals("WayPoint")) { min.nowTarget = RedPoint; other.GetComponent <AIDestinationSetter>().target = RedPoint.transform; } min.MoveTarget = RedPoint; } else if (other.name.Contains("Red")) { if (min.nowTarget == null) { min.nowTarget = BluePoint; other.GetComponent <AIDestinationSetter>().target = BluePoint.transform; } else if (min.nowTarget.tag.Equals("WayPoint")) { min.nowTarget = BluePoint; other.GetComponent <AIDestinationSetter>().target = BluePoint.transform; } //other.GetComponent<MinionAtk>().MoveTarget = BluePoint; min.MoveTarget = BluePoint; } } }
private void OnCollisionEnter(Collision collision) { if (skillselect.Equals(SSelect.W) && isSkillIng) { if (collision.transform.tag.Equals("Minion") && collision.gameObject != TempObject1) { MinionAtk mA = collision.gameObject.GetComponent <MinionBehavior>().minAtk; mA.PushMe(Vector3.up * 3 + collision.transform.position + (((collision.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 (collision.gameObject.GetComponent <MinionBehavior>().HitMe(damage, "AP")) { //여기에는 나중에 평타 만들면 플레이어의 현재 공격 타겟이 죽었을 시 초기화해주는 것을 넣자. TheChampionAtk.ResetTarget(); } } } }
private void OnTriggerEnter(Collider other) { //미니언, 챔피언, 몬스터가 벽으로 밀쳐진다면 벽을 뚫고 지나가지 못하게 엮으로 밀어준다. if (other.gameObject.tag.Equals("Minion")) { MinionAtk minAtk = other.GetComponent <MinionBehavior>().minAtk; if (!minAtk.isPushing) { return; } minAtk.PushWall(); } else if (other.gameObject.layer.Equals(LayerMask.NameToLayer("Champion"))) { ChampionAtk champAtk = other.GetComponent <ChampionBehavior>().myChampAtk; if (!champAtk.isPushing) { return; } champAtk.PushWall(); } else if (other.gameObject.layer.Equals(LayerMask.NameToLayer("Monster"))) { MonsterAtk monAtk = other.GetComponent <MonsterBehaviour>().monAtk; if (!monAtk.isPushing) { return; } monAtk.PushWall(); } }
private void OnTriggerEnter(Collider other) { if (other.tag.Equals("Minion")) { MinionAtk mA = other.GetComponent <MinionBehavior>().minAtk; float damage = mySkill.skillData.eDamage[mySkill.TheChampionData.skill_E - 1] + mySkill.Acalculate(mySkill.skillData.eAstat, mySkill.skillData.eAvalue); if (other.GetComponent <MinionBehavior>().HitMe(damage, "AP")) { //여기에는 나중에 평타 만들면 플레이어의 현재 공격 타겟이 죽었을 시 초기화해주는 것을 넣자. mySkill.TheChampionAtk.ResetTarget(); } } else if (other.tag.Equals("Player")) { ChampionAtk cA = other.GetComponent <ChampionBehavior>().myChampAtk; float damage = mySkill.skillData.eDamage[mySkill.TheChampionData.skill_E - 1] + mySkill.Acalculate(mySkill.skillData.eAstat, mySkill.skillData.eAvalue); if (other.GetComponent <ChampionBehavior>().HitMe(damage, "AP")) { mySkill.TheChampionAtk.ResetTarget(); } } }
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; }
/// <summary> /// W 스킬 함수 /// </summary> public override void W() { GameObject enemyObj = wArguObj; Vector3 enemyVector = wArguVec; OnMove(); HitEffectRPC("Alistar", "W"); GameObject obj = GetSkillInThePool("W"); obj.transform.position = transform.position; obj.SetActive(true); // 공격하는 대상에 따라 공격 처리를 한다. if (enemyObj.tag.Equals("Minion")) { MinionBehavior minBehav = enemyObj.GetComponent <MinionBehavior>(); // 적인지 확인 if (!enemyObj.gameObject.name.Contains(TheChampionBehaviour.team)) { MinionAtk minAtk = minBehav.minAtk; Vector3 directionVec = (enemyObj.transform.position - enemyVector).normalized; Vector3 maxVec = enemyObj.transform.position + (directionVec * 10);; RaycastHit hit; if (Physics.Raycast(minAtk.transform.position, directionVec, out hit, 12, 1 << LayerMask.NameToLayer("WallCollider"))) { float dist = Vector3.Distance(hit.point, enemyObj.transform.position); maxVec = enemyObj.transform.position + (directionVec * (dist - 1f)); } //밀친 후 공격당한 대상의 HitMe 함수를 호출 maxVec.y = 0; minAtk.PushMe(maxVec, 0.5f); minAtk.PauseAtk(1f, true); float damage = skillData.wDamage[TheChampionData.skill_W - 1] + Acalculate(skillData.wAstat, skillData.wAvalue); if (minBehav != null) { int viewID = minBehav.GetComponent <PhotonView>().viewID; HitRPC(viewID, damage, "AP", "Push"); minBehav.HitMe(damage, "AP", gameObject); } } } else if (enemyObj.layer.Equals(LayerMask.NameToLayer("Champion"))) { ChampionBehavior champBehav = enemyObj.GetComponent <ChampionBehavior>(); // 적인지 확인 if (champBehav.team != TheChampionBehaviour.team) { ChampionAtk champAtk = champBehav.myChampAtk; Vector3 directionVec = (enemyObj.transform.position - enemyVector).normalized; Vector3 maxVec = enemyObj.transform.position + (directionVec * 5);; RaycastHit hit; if (Physics.Raycast(champAtk.transform.position, directionVec, out hit, 6, 1 << LayerMask.NameToLayer("WallCollider"))) { float dis = Vector3.Distance(hit.point, enemyObj.transform.position); maxVec = enemyObj.transform.position + (directionVec * (dis - 1f)); } //밀친 후 공격당한 대상의 HitMe 함수를 호출 maxVec.y = 0.5f; champAtk.PushMe(maxVec, 0.5f); champAtk.PauseAtk(1f, true); float damage = skillData.wDamage[TheChampionData.skill_W - 1] + Acalculate(skillData.wAstat, skillData.wAvalue); if (champBehav != null) { int viewID = champBehav.GetComponent <PhotonView>().viewID; HitRPC(viewID, damage, "AP", "Push"); champBehav.HitMe(damage, "AP", gameObject, gameObject.name); } } } else if (enemyObj.layer.Equals(LayerMask.NameToLayer("Monster"))) { MonsterBehaviour monBehav = enemyObj.GetComponent <MonsterBehaviour>(); MonsterAtk monAtk = monBehav.monAtk; Vector3 directionVec = (enemyObj.transform.position - enemyVector).normalized; Vector3 maxVec = enemyObj.transform.position + (directionVec * 5);; RaycastHit hit; if (Physics.Raycast(monAtk.transform.position, directionVec, out hit, 6, 1 << LayerMask.NameToLayer("WallCollider"))) { float dist = Vector3.Distance(hit.point, enemyObj.transform.position); maxVec = enemyObj.transform.position + (directionVec * (dist - 1f)); } //밀친 후 공격당한 대상의 HitMe 함수를 호출 maxVec.y = 0; monAtk.PushMe(maxVec, 0.5f); monAtk.PauseAtk(1f, true); float damage = skillData.wDamage[TheChampionData.skill_W - 1] + Acalculate(skillData.wAstat, skillData.wAvalue); if (monBehav != null) { int viewID = monBehav.GetComponent <PhotonView>().viewID; HitRPC(viewID, damage, "AP", "Push"); monBehav.HitMe(damage, "AP", gameObject); } } // 스킬 선택을 해제함 skillSelect = SkillSelect.none; }