public override void In_Skill_R() { isOkGo = playerScript.GetRangeAnyPoint(projector_W[1].transform, projector_W[0].transform, 48.75f); if (Input.GetMouseButtonDown(0)) { if (isOkGo) { if (playerScript.ConsumeAP(skillR_needAP, true)) { playerScript.SkillState = Player.SkillData.None; //開啟攻擊範圍 playerScript.Net.RPC("GetSkillPos", PhotonTargets.All, projector_W[1].transform.position); //關閉顯示範圍 ProjectorManager.SwitchPorjector(projector_W, false); transform.forward = playerScript.arrow.forward; playerScript.stopAnything_Switch(true); playerScript.Net.RPC("Skill_R_Fun", PhotonTargets.All); } } else { playerScript.HintScript.CreatHint("不能在此處傳送"); } } if (Input.GetMouseButtonDown(1)) { playerScript.CancelNowSkill(); } }
//R按下&&偵測 public override void Skill_R_Click() { if (!playerScript.ConsumeAP(skillR_needAP, false)) { return; } playerScript.canSkill_R = false; playerScript.SkillState = Player.SkillData.skill_R; //顯示範圍 ProjectorManager.SwitchPorjector(projector_R, true); }
public override void In_Skill_Q() { if (Input.GetMouseButtonDown(0)) { if (playerScript.ConsumeAP(skillQ_needAP, true)) { playerScript.SkillState = Player.SkillData.None; ProjectorManager.SwitchPorjector(projector_Q, false); //關閉顯示範圍 transform.forward = playerScript.arrow.forward; playerScript.stopAnything_Switch(true); playerScript.Net.RPC("Skill_Q_Fun", PhotonTargets.All); } } if (Input.GetMouseButtonDown(1)) { playerScript.CancelNowSkill(); } }
public override void In_Skill_R() { if (Input.GetMouseButtonDown(0)) { if (playerScript.ConsumeAP(skillR_needAP, true)) { playerScript.SkillState = Player.SkillData.None; //開啟攻擊範圍 playerScript.Net.RPC("GetSkillPos", PhotonTargets.All, projector_R[0].transform.position); //關閉顯示範圍 ProjectorManager.SwitchPorjector(projector_R, false); myCachedTransform.forward = playerScript.arrow.forward; playerScript.stopAnything_Switch(true); playerScript.Net.RPC("Skill_R_Fun", PhotonTargets.All); } } if (Input.GetMouseButtonDown(1)) { playerScript.CancelNowSkill(); } }
public override void CancelDetectSkill(Player.SkillData _nowSkill) { switch (_nowSkill) { case Player.SkillData.skill_Q: ProjectorManager.SwitchPorjector(projector_Q, false); break; case Player.SkillData.skill_W: ProjectorManager.SwitchPorjector(projector_W, false); break; case Player.SkillData.skill_R: ProjectorManager.SwitchPorjector(projector_W, false); break; case Player.SkillData.skill_E: projector_E.enabled = false; break; default: if (projector_Q[0].enabled) { ProjectorManager.SwitchPorjector(projector_Q, false); } if (projector_W[1].enabled) { ProjectorManager.SwitchPorjector(projector_W, false); } if (projector_E.enabled) { projector_E.enabled = false; } break; } }