Ejemplo n.º 1
0
    private void Update()
    {
        if (PhotonNetwork.player.IsLocal)
        {
            if (Input.GetKey(KeyCode.LeftAlt) && Input.GetMouseButton(0))
            {
                Line.enabled = true;
                sign         = GetMousePosS(StartPos, Endpos);
            }

            if (Line.enabled && Input.GetMouseButtonUp(0))
            {
                if ((sign.Equals(Sign.Exit))) // Exit 를 선택 했다면
                {
                    gameObject.SetActive(false);
                    return;
                }

                if (!pingPool.CanMakePing) //핑 횟수제한을 넘었다면
                {
                    //사용할수없습니다 메세지 출력
                    gameObject.SetActive(false);
                    return;
                }

                if (!MakeOnce)
                {
                    MakeOnce = true;
                    MakePingSign();
                }
                this.gameObject.SetActive(false);
            }
        }
    }
Ejemplo n.º 2
0
    private void Update()
    {
        if (Input.GetKey(KeyCode.LeftAlt) && Input.GetMouseButton(0))
        {
            Line.enabled = true;
            sign         = GetMousePosS(StartPos, Endpos);
        }

        if (Line.enabled && Input.GetMouseButtonUp(0))
        {
            if ((sign.Equals(Sign.Exit))) // Exit 를 선택 했다면
            {
                gameObject.SetActive(false);
                return;
            }

            if (!CanMakePing) //핑 횟수제한을 넘었다면
            {
                //사용할수없습니다 메세지 출력
                gameObject.SetActive(false);
                return;
            }

            MakePingSign();
            this.gameObject.SetActive(false);
        }
    }
        /// <summary>
        /// Returns true if ResponseInstruction instances are equal
        /// </summary>
        /// <param name="input">Instance of ResponseInstruction to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ResponseInstruction input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Text == input.Text ||
                     (Text != null &&
                      Text.Equals(input.Text))
                     ) &&
                 (
                     StreetName == input.StreetName ||
                     (StreetName != null &&
                      StreetName.Equals(input.StreetName))
                 ) &&
                 (
                     Distance == input.Distance ||
                     (Distance != null &&
                      Distance.Equals(input.Distance))
                 ) &&
                 (
                     Time == input.Time ||
                     (Time != null &&
                      Time.Equals(input.Time))
                 ) &&
                 (
                     Interval == input.Interval ||
                     Interval != null &&
                     Interval.SequenceEqual(input.Interval)
                 ) &&
                 (
                     Sign == input.Sign ||
                     (Sign != null &&
                      Sign.Equals(input.Sign))
                 ) &&
                 (
                     AnnotationText == input.AnnotationText ||
                     (AnnotationText != null &&
                      AnnotationText.Equals(input.AnnotationText))
                 ) &&
                 (
                     AnnotationImportance == input.AnnotationImportance ||
                     (AnnotationImportance != null &&
                      AnnotationImportance.Equals(input.AnnotationImportance))
                 ) &&
                 (
                     ExitNumber == input.ExitNumber ||
                     (ExitNumber != null &&
                      ExitNumber.Equals(input.ExitNumber))
                 ) &&
                 (
                     TurnAngle == input.TurnAngle ||
                     (TurnAngle != null &&
                      TurnAngle.Equals(input.TurnAngle))
                 ));
        }
Ejemplo n.º 4
0
        public void Equals_Object(string sign1Value, string sign2Value, bool expectedEqual)
        {
            Sign   sign1 = new Sign(sign1Value);
            object sign2 = new Sign(sign2Value);

            bool result = sign1.Equals(sign2);

            Assert.That(result, Is.EqualTo(expectedEqual));
        }
Ejemplo n.º 5
0
        TurnResult IGame.MakeTurn(Sign sign, Field field)
        {
            if (!sign.Equals(this._currentPlayer.PlayerSign))
                throw new ItIsNotYourTurnException();

            var result = this._boardManager.MakeTurn(sign, field);

            if (result == TurnResult.Wrong || result == TurnResult.Win)
                return result;

            this._currentPlayer = this.GetCurrentPlayerOpponent();

            return result;
        }
Ejemplo n.º 6
0
 public bool Equals(UfeFileGenerator other)
 {
     if (other == null)
     {
         return(false);
     }
     if (!Sign.Equals(other.Sign))
     {
         return(false);
     }
     if (!Library.Equals(other.Library))
     {
         return(false);
     }
     return(true);
 }
Ejemplo n.º 7
0
        public bool Equals(CoarseDuration other)
        {
            if (ReferenceEquals(other, null))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Years.Equals(other.Years) &&
                   Months.Equals(other.Months) &&
                   Days.Equals(other.Days) &&
                   Hours.Equals(other.Hours) &&
                   Minutes.Equals(other.Minutes) &&
                   Seconds.Equals(other.Seconds) &&
                   Sign.Equals(other.Sign));
        }
Ejemplo n.º 8
0
    private void Update()
    {
        isThisThingOn = this.gameObject.GetActive();

        if (PhotonNetwork.player.IsLocal)
        {
            if (Input.GetKey(KeyCode.LeftAlt) && Input.GetMouseButton(0))
            {
                LineR.enabled = true;
                isThisThingOn = true;
                //라인렌더 종료지점 설정

                MousePosToRay = TargetCamera.ScreenPointToRay(Input.mousePosition);
                float distanceForEndPos = 0;
                plane.Raycast(MousePosToRay, out distanceForEndPos);
                endPos  = MousePosToRay.origin + MousePosToRay.direction * distanceForEndPos;
                endline = endPos;
                LineR.SetPosition(1, GetMousePosition());
                sign = GetMousePos(startPos, endPos);
            }


            if (LineR.enabled && Input.GetMouseButtonUp(0))
            {
                if (!pingPool.CanMakePing) //핑 횟수제한을 넘었다면
                {
                    isThisThingOn = false;
                    //사용할수없습니다 메세지 출력
                    gameObject.SetActive(false);
                    return;
                }
                else if ((sign.Equals(Sign.Exit))) // Exit 를 선택 했다면
                {
                    isThisThingOn = false;
                    gameObject.SetActive(false);
                    return;
                }

                Mouse.z = Camera.main.farClipPlane;                      // Enable 에서 받아온 마우스 초기값
                Ray          ray  = Camera.main.ScreenPointToRay(Mouse); // 마우스 좌표를 기준으로  스크린을투과하는 레이
                RaycastHit[] hits = Physics.RaycastAll(ray, Mathf.Infinity, layerMask);
                foreach (RaycastHit hit in hits)
                {
                    if (hit.collider.gameObject.layer.Equals(LayerMask.NameToLayer("GroundLayer")))
                    {
                        if (!MakeOnce)
                        {
                            MakeOnce = true;
                            // 타겟을 레이캐스트가 충돌된 곳으로 옮긴다.
                            InitialCoordinate = hit.point;
                            MakePingSign();
                        }
                    }
                }

                isThisThingOn       = false;
                LineR.enabled       = false;
                LineR.positionCount = 0;
                this.gameObject.SetActive(false);
            }
        }
        if (isThisThingOn == false && this.gameObject.GetActive())
        {
            this.gameObject.SetActive(false);
        }
    }
Ejemplo n.º 9
0
    private void Update()
    {
        if (Input.GetKey(KeyCode.LeftAlt) && Input.GetMouseButton(1)) //챔피언 클릭시 타겟 마킹
        {
            //GetFxPool("Target",챔피언 위치);
        }

        else if (InitialCameraPos.Equals(Camera.main.transform.position)) // 카메라가 움직였는가?
        {
            if (Input.GetKey(KeyCode.LeftAlt) && Input.GetMouseButton(0))
            {
                LineR.enabled = true;

                //라인렌더 종료지점 설정
                MousePosToRay = TargetCamera.ScreenPointToRay(Input.mousePosition);
                float distanceForEndPos = 0;
                plane.Raycast(MousePosToRay, out distanceForEndPos);
                endPos = MousePosToRay.origin + MousePosToRay.direction * distanceForEndPos;

                LineR.SetPosition(1, endPos);
                sign = GetMousePos(startPos, endPos);
            }

            if (LineR.enabled && Input.GetMouseButtonUp(0))
            {
                if (!CanMakePing) //핑 횟수제한을 넘었다면
                {
                    //사용할수없습니다 메세지 출력
                    gameObject.SetActive(false);
                    return;
                }
                else if ((sign.Equals(Sign.Exit))) // Exit 를 선택 했다면
                {
                    gameObject.SetActive(false);
                    return;
                }

                Mouse.z = Camera.main.farClipPlane;                      // Enable 에서 받아온 마우스 초기값
                Ray          ray  = Camera.main.ScreenPointToRay(Mouse); // 마우스 좌표를 기준으로  스크린을투과하는 레이
                RaycastHit[] hits = Physics.RaycastAll(ray);
                foreach (RaycastHit hit in hits)
                {
                    if (hit.collider.gameObject.layer.Equals(LayerMask.NameToLayer("GroundLayer")))
                    {
                        // 타겟을 레이캐스트가 충돌된 곳으로 옮긴다.
                        InitialCoordinate = hit.point;
                        MakePingSign();
                    }
                }

                LineR.enabled       = false;
                LineR.positionCount = 0;
                this.gameObject.SetActive(false);
            }
        }
        else // 카메라가 움직인다면
        {
            gameObject.SetActive(false);
        }
        // 동기화
    }