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 }
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); } }
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 }