예제 #1
0
파일: Player.cs 프로젝트: realtics/team4
    public void NetworkDecideTargetPos(Vector2 NetworktargetPos)
    {
        targetPos = NetworktargetPos;
        OwnCharacter.StartRun();
        MoveState = ePlayerState.Move;

        #region DecideDirection
        if (OwnCharacter.transform.position.x < targetPos.x)
        {
            SetFlipCharacter(false);
        }
        else
        {
            SetFlipCharacter(true);
        }
        #endregion
    }
예제 #2
0
파일: Player.cs 프로젝트: realtics/team4
    public void SetTargetPosition(LandTile landTile)
    {
        OwnCharacter.StartRun();
        if (FriendFarmManager.Instance == null)
        {
            LeaveTile();
        }
        _targetPosition   = landTile.transform.position;
        _targetPosition.z = transform.localPosition.z;
        _currentLandTile  = landTile;
        _farmState        = eFarmState.Move;

        if (OwnCharacter.transform.position.x < _targetPosition.x)
        {
            SetFlipCharacter(false);
        }
        else
        {
            SetFlipCharacter(true);
        }
    }
예제 #3
0
파일: Player.cs 프로젝트: realtics/team4
    public void DecideTargetPos(Vector3 clickPos)
    {
        targetPos = (Vector2)mainCam.ScreenToWorldPoint(clickPos);
        if (!NetworkManager.Instance.IsSinglePlay())
        {
            NetworkManager.Instance.SendRequestMove(targetPos.x, targetPos.y, 0);
        }

        OwnCharacter.StartRun();
        MoveState = ePlayerState.Move;

        #region DecideDirection
        if (OwnCharacter.transform.position.x < targetPos.x)
        {
            SetFlipCharacter(false);
        }
        else
        {
            SetFlipCharacter(true);
        }
        #endregion
    }