private void MakePingSign() { if (pingPool.MakeCount >= pingPool.MakeMaxCount) { //print("생성할수 없다."); } else { switch (sign) { case Sign.Help: pingPool.GetFxPool("Help", InitialCoordinate, false); break; case Sign.Missing: pingPool.GetFxPool("Missing", InitialCoordinate, false); break; case Sign.Danger: pingPool.GetFxPool("Danger", InitialCoordinate, false); break; case Sign.Going: pingPool.GetFxPool("Going", InitialCoordinate, false); break; case Sign.Exit: break; } pingPool.MakeCount++; } MakeOnce = false; }
private void MakePingSign() { if (!MakeOnce) { switch (sign) { case Sign.Help: pingPool.GetFxPool("Help", InitialCoordinate); break; case Sign.Missing: pingPool.GetFxPool("Missing", InitialCoordinate); break; case Sign.Danger: pingPool.GetFxPool("Danger", InitialCoordinate); break; case Sign.Going: pingPool.GetFxPool("Going", InitialCoordinate); break; case Sign.Exit: break; } pingPool.MakeCount++; if (pingPool.MakeCount >= pingPool.MakeMaxCount) { CanMakePing = false; } MakeOnce = false; } }
//타겟팅 점화, 강타, 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; } }
private void TeleportCheck() { 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 (isTeleportDestSet)//목표 설정후에 { if (!TeleportingOnce) { curhp = ChampData.totalstat.Hp; TeleportingOnce = 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++) { if (fog[i].gameObject.GetActive()) { fog[i].stopParticle(); } } } fog.Clear(); cursor.SetCursor(cursor.PreCursor, Vector2.zero); isTeleportDestSet = false; TeleportTime = 4.5f; TeleportingOnce = 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++) { if (fog[i].gameObject.GetActive()) { 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; TeleportingOnce = 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; TeleportingOnce = false; Invoke("TeleportEnd", 0.5f); } } }