private void Update() { if (SceneManager.GetActiveScene().name.Equals("Game Scene")) { if (GameObject.Find("RoomManager") != null) { if (PhotonNetwork.LocalPlayer.ActorNumber == GameObject.Find("RoomManager").GetComponent <Room>().bossActorNum) { bulletBtn = GameObject.Find("BulletBtn").GetComponent <BulletBtn>(); if (bulletBtn) { pv.RPC("disappear", RpcTarget.All); mouse = Camera.main.ScreenToWorldPoint(Input.mousePosition); angle = Mathf.Atan2(mouse.y - target.y, mouse.x - target.x) * Mathf.Rad2Deg; //마우스 클릭 시 레이저 각도 고정 if (Input.GetMouseButtonDown(0) && bulletBtn.num == 1 && check) { pv.RPC("FixAngle", RpcTarget.All, angle); } } } } } }
// Update is called once per frame void Update() { if (SceneManager.GetActiveScene().name.Equals("Game Scene")) { if (GameObject.Find("RoomManager") != null) { if (PhotonNetwork.LocalPlayer.ActorNumber == GameObject.Find("RoomManager").GetComponent <Room>().bossActorNum) { bulletBtn = GameObject.Find("BulletBtn").GetComponent <BulletBtn>(); if (bulletBtn) { //마우스 포지션 계산 MousePosition = Input.mousePosition; MousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition); //마우스 클릭 & 왼쪽일 경우 if (MousePosition.x < 0 && SpeakerRotation) { if (Input.GetMouseButtonDown(0) && SpeakerRotation) { SpeakerRotation = false; //플래그 Shooting_Routine(2.0f); //코루틴을 호출합니다 } } } } } } }
// Update is called once per frame void Update() { if (SceneManager.GetActiveScene().name.Equals("Game Scene")) { if (GameObject.Find("RoomManager") != null) { if (PhotonNetwork.LocalPlayer.ActorNumber == GameObject.Find("RoomManager").GetComponent <Room>().bossActorNum) { bulletBtn = GameObject.Find("BulletBtn").GetComponent <BulletBtn>(); if (bulletBtn) { if (bulletBtn.num == 3 && check) // 스킬범위 표시 { pv.RPC("setAct", RpcTarget.All, true); } else { pv.RPC("setAct", RpcTarget.All, false); // 마우스 입력 OR 다른 스킬 선택 시, 스킬범위 표시를 중지함 } if (Input.GetMouseButtonDown(0) && bulletBtn.num == 3 && check) // 실제로 스킬을 발동시키는 경우 { pv.RPC("Flash", RpcTarget.All); // 스킬 발동 } } } } } }
void Update() { if (SceneManager.GetActiveScene().name.Equals("Game Scene")) { if (GameObject.Find("RoomManager") != null) { if (PhotonNetwork.LocalPlayer.ActorNumber == GameObject.Find("RoomManager").GetComponent <Room>().bossActorNum) { bulletBtn = GameObject.Find("BulletBtn").GetComponent <BulletBtn>(); if (bulletBtn) { MousePosition = Input.mousePosition; MousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition); //오른쪽에 가까울때만 스킬 적용 if (Input.GetMouseButtonDown(0) && bulletBtn.num == 4 && check && MousePosition.x > 0) { gameObject.GetComponent <LaserRotation>().isFinish = false; pv.RPC("FadeIn", RpcTarget.All, 1f); } } } } } }
void Update() { if (SceneManager.GetActiveScene().name.Equals("Game Scene")) { if (GameObject.Find("RoomManager") != null) { if (PhotonNetwork.LocalPlayer.ActorNumber == GameObject.Find("RoomManager").GetComponent <Room>().bossActorNum) { bulletBtn = GameObject.Find("BulletBtn").GetComponent <BulletBtn>(); if (bulletBtn) { if (Input.GetMouseButtonDown(0) && bulletBtn.num == 1 && check) { pv.RPC("FadeIn", RpcTarget.All, 2f); timer += Time.deltaTime; if (timer > waitingTime) { //Action //SLRng.SetActive(false); } } } } } //state = false; // 추후에 추가될 플래그 변수 } }
void Update() { if (SceneManager.GetActiveScene().name.Equals("Game Scene")) { if (GameObject.Find("RoomManager") != null) { if (PhotonNetwork.LocalPlayer.ActorNumber == GameObject.Find("RoomManager").GetComponent <Room>().bossActorNum) { bulletBtn = GameObject.Find("BulletBtn").GetComponent <BulletBtn>(); if (bulletBtn) { if (bulletBtn.num == 0) { // 마우스 따라다니기 gameObject.GetComponent <SpriteRenderer>().enabled = true; gameObject.transform.position = Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, 1)); if (Input.GetMouseButton(0)) { if ((!isFire) && (cnt < shotNum) && (!isFinish)) { isFinish = true; mousePosition = this.transform.position; StartCoroutine(makeCircle()); cnt++; } } else { isFire = false; } } else { gameObject.GetComponent <SpriteRenderer>().enabled = false; } } } } } }
// Update is called once per frame void Update() { if (SceneManager.GetActiveScene().name.Equals("Game Scene")) { if (GameObject.Find("RoomManager") != null) { if (PhotonNetwork.LocalPlayer.ActorNumber == GameObject.Find("RoomManager").GetComponent <Room>().bossActorNum) { bulletBtn = GameObject.Find("BulletBtn").GetComponent <BulletBtn>(); if (bulletBtn) { selectNum = bulletBtn.num; if (Input.GetMouseButtonUp(0)) { if (selectNum == 5) { MousePosition = Input.mousePosition; MousePosition = Camera.ScreenToWorldPoint(MousePosition); if (MousePosition.x > 0) { Debug.Log("<<오른쪽 스킬 발동>>"); //스킬 중복 발동 방지 if (!rightskillStart && GameObject.FindGameObjectWithTag("ampRight").activeSelf) { leftAmp.SetActive(false); pv.RPC("startSkill", RpcTarget.All); pv.RPC("random_bullet", RpcTarget.All); //StartCoroutine("skill_start"); pv.RPC("endingSkill", RpcTarget.All); //Invoke("skillEnd", 5); } } } } } } } } }
void Update() { if (SceneManager.GetActiveScene().name.Equals("Game Scene")) { if (GameObject.Find("RoomManager") != null) { if (PhotonNetwork.LocalPlayer.ActorNumber == GameObject.Find("RoomManager").GetComponent <Room>().bossActorNum) { bulletBtn = GameObject.Find("BulletBtn").GetComponent <BulletBtn>(); if (bulletBtn) { if (Input.GetMouseButtonDown(0) && bulletBtn.num == 3 && check) { pv.RPC("FadeIn", RpcTarget.All, 4f); // 페이드인 } } } } } }
void Update() { if (SceneManager.GetActiveScene().name.Equals("Game Scene")) { if (GameObject.Find("RoomManager") != null) { if (PhotonNetwork.LocalPlayer.ActorNumber == GameObject.Find("RoomManager").GetComponent <Room>().bossActorNum) { bulletBtn = GameObject.Find("BulletBtn").GetComponent <BulletBtn>(); if (bulletBtn) { if (Input.GetMouseButtonDown(0) && bulletBtn.num == 2 && check) { selectMode = Random.Range(1, 3); //랜덤으로 1 혹은 2의 정수 생성 pv.RPC("startMode", RpcTarget.All, selectMode); } } } } } }
private void Update() { if (SceneManager.GetActiveScene().name.Equals("Game Scene")) { if (GameObject.Find("RoomManager") != null) { if (PhotonNetwork.LocalPlayer.ActorNumber == GameObject.Find("RoomManager").GetComponent <Room>().bossActorNum) { bulletBtn = GameObject.Find("BulletBtn").GetComponent <BulletBtn>(); if (bulletBtn) { if (Input.GetMouseButtonDown(0) && (bulletBtn.num == 1)) //활성화 { //Debug.Log("2번 탄환 실행"); pv.RPC("setColor", RpcTarget.All, 1); } } } } } }
private void Update() { if (SceneManager.GetActiveScene().name.Equals("Game Scene")) { if (GameObject.Find("RoomManager") != null) { if (PhotonNetwork.LocalPlayer.ActorNumber == GameObject.Find("RoomManager").GetComponent <Room>().bossActorNum) { bulletBtn = GameObject.Find("BulletBtn").GetComponent <BulletBtn>(); if (bulletBtn) { checkPosition(); if (Input.GetMouseButtonDown(0)) { checkPosition(); } } } } } }