//스킬 활성화 유무 체크 private void SmiteCheck() { if (isSmiteClick) { if (isIgniteClick || isTeleportClick || Input.GetMouseButton(1)) { cursor.SetCursor(0, Vector2.zero); isSmiteClick = false; splatmanager.Cancel(); return; } else if (Input.GetMouseButtonDown(0)) { splatmanager.Cancel(); isSmiteClick = false; Smite(); cursor.SetCursor(0, Vector2.zero); } } }
//타겟팅 점화, 강타, private void Update() { if (isInGameScene) { if (chat.chatInput.IsActive()) { return; } if (isIgniteClick) { if (isSmiteClick || isTeleportClick || Input.GetMouseButton(1)) { cursor.SetCursor(0, Vector2.zero); isIgniteClick = false; splatmanager.Cancel(); return; } else if (Input.GetMouseButtonDown(0)) { splatmanager.Cancel(); isIgniteClick = false; Ignite(); cursor.SetCursor(0, Vector2.zero); } } if (isSmiteClick) { if (isIgniteClick || isTeleportClick || Input.GetMouseButton(1)) { cursor.SetCursor(0, Vector2.zero); isSmiteClick = false; splatmanager.Cancel(); return; } else if (Input.GetMouseButtonDown(0)) { splatmanager.Cancel(); isSmiteClick = false; Smite(); cursor.SetCursor(0, Vector2.zero); } } if (isTeleportClick) { if (isIgniteClick || isSmiteClick || Input.GetMouseButton(1)) { cursor.SetCursor(0, Vector2.zero); isTeleportClick = false; return; } else if (Input.GetMouseButtonDown(0)) { TeleportDestinationSet(); isTeleportClick = false; cursor.SetCursor(0, Vector2.zero); } } } if (isIgnite) { ImOnFire = true; IgnteTime += Time.deltaTime; if (IgnteTime >= 1.0f) { IgnteTime = 0; IgnteDam += Mathf.FloorToInt(55 + (25 * Attackerlevel)) / 5; if (mybehav.HitMe((float)Mathf.FloorToInt(55 + (25 * Attackerlevel)) / 5, "FD", IgniteAtker, IgniteAtker.gameObject.name)) { if (ImOnFire) { ImOnFire = false; IgnteTime = 0; IgnteDam = 0; ChampionData chdata = IgniteAtker.GetComponent <ChampionData>(); chdata.Kill_CS_Gold_Exp("", 0, this.transform.position); } } } if (IgnteDam >= Mathf.FloorToInt(55 + (25 * Attackerlevel))) { IgnteDam = 0; IgnteTime = 0; isIgnite = false; } } if (isTeleportDestSet)//목표 설정후에 { if (!Once) { curhp = ChampData.totalstat.Hp; Once = true; SendEffect("Teleport", Player.transform.position, team, photonview.viewID); Ping.GetFxPool("Going", TeleportDestPos, false); if (Target.GetComponent <PhotonView>() != null) { SendEffect("Teleport", Target.transform.position, team, photonview.viewID); } else { SendEffect("Teleport", Target.transform.position, team); } AIPath.isStopped = true; if (Target.transform.name.Contains("Minion")) { Target.GetComponent <Pathfinding.AIPath>().isStopped = true; } } TeleportTime -= Time.deltaTime; if (curhp > ChampData.totalstat.Hp) { if (fog.Count > 0) { for (int i = 0; i < fog.Count; i++) { fog[i].stopParticle(); } } fog.Clear(); cursor.SetCursor(cursor.PreCursor, Vector2.zero); isTeleportDestSet = false; TeleportTime = 4.5f; Once = false; cam.ResetTarget(); AIPath.isStopped = false; if (Target.transform.name.Contains("Minion")) { Target.GetComponent <Pathfinding.AIPath>().isStopped = false; } return; } else if (Input.GetKeyDown(KeyCode.D)) { if (fog.Count > 0) { for (int i = 0; i < fog.Count; i++) { fog[i].stopParticle(); } } fog.Clear(); cursor.SetCursor(cursor.PreCursor, Vector2.zero); if (Spell_D == 6) { ChampData.current_Cooldown_D = 1; } else if (Spell_F == 6) { ChampData.current_Cooldown_F = 1; } isTeleportDestSet = false; TeleportTime = 4.5f; Once = false; cam.ResetTarget(); cursor.SetCursor(0, Vector3.zero); AIPath.isStopped = false; if (Target.transform.name.Contains("Minion")) { Target.GetComponent <Pathfinding.AIPath>().isStopped = false; } return; } else if (TeleportTime <= 0) { cam.SetTarget(Player.transform); TeleportTime = 4.5f; TeleportDestPos.y = Player.transform.position.y; Player.transform.position = TeleportDestPos; //AstarTarget.transform.position = Player.transform.position; isTeleportDestSet = false; Once = false; Invoke("TeleportEnd", 0.5f); } } if (isGhost) //유체화 켜졌을때 { if (!aiPath) { return; } GhostAcceleration -= Time.deltaTime; if (GhostAcceleration >= 8.0f) { MaxSpeed = aiPath.maxSpeed + (aiPath.maxSpeed * (0.27f + (0.01f * (float)Playerlevel))); aiPath.maxSpeed += (aiPath.maxSpeed * (0.27f + (0.01f * Playerlevel))) * Time.deltaTime; if (aiPath.maxSpeed >= MaxSpeed) { aiPath.maxSpeed = MaxSpeed; } //27% + (1% * level) } if (GhostAcceleration <= 0) { Ghost(false); } } if (Input.GetKeyDown(KeyCode.J)) { ChampData.current_Cooldown_D = 1; ChampData.current_Cooldown_F = 1; } }
/// <summary> /// 선택된 스킬을 해제하는 함수 /// </summary> public void CancelSkill() { TheSplatManager.Cancel(); skillSelect = SkillSelect.none; isSkilling = false; }