fix: update logic swim hp.
This commit is contained in:
@@ -6,6 +6,7 @@ namespace BrewMonster
|
||||
{
|
||||
public class CameraController : MonoBehaviour, IPointerDownHandler, IPointerUpHandler, IDragHandler
|
||||
{
|
||||
public static CameraController Instance;
|
||||
[SerializeField]private CinemachineCamera _cinemachineCamera;
|
||||
[SerializeField]private CinemachineOrbitalFollow orbital;
|
||||
private Vector2 currentPos;
|
||||
@@ -15,6 +16,13 @@ namespace BrewMonster
|
||||
public float speedX = 1f;
|
||||
public float speedY = 1f;
|
||||
|
||||
public CinemachineOrbitalFollow Orbital { get => orbital;}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
public void OnDrag(PointerEventData eventData)
|
||||
{
|
||||
delta = eventData.position - currentPos;
|
||||
|
||||
@@ -531,7 +531,6 @@ namespace BrewMonster.Scripts
|
||||
}
|
||||
|
||||
vCurPos = m_pHost.m_MoveCtrl.GroundMove(m_vCurDir, fSpeed, fDeltaTime, m_pHost.m_fVertSpeed);
|
||||
Debug.LogError(vCurPos);
|
||||
UpdateFacingFromDelta(vCurPos);
|
||||
|
||||
if (m_pHost.m_MoveCtrl.MoveBlocked() >= 3)
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace BrewMonster
|
||||
else
|
||||
{
|
||||
float h0 = 0f;
|
||||
int countHits0 = Physics.RaycastNonAlloc(vWatStart, Vector3.down, fHitsWater, 1000f, 1 << 8);
|
||||
int countHits0 = Physics.RaycastNonAlloc(vWatStart + Vector3.up * 500f, Vector3.down, fHitsWater, 1000f, 1 << 8);
|
||||
if (countHits0 > 0)
|
||||
{
|
||||
h0 = fHitsWater[0].point.y;
|
||||
|
||||
@@ -4227,7 +4227,7 @@ namespace BrewMonster
|
||||
else if (m_iMoveEnv == Move_environment.MOVEENV_WATER)
|
||||
{
|
||||
vPushDir.x = joystick.Horizontal;
|
||||
vPushDir.y = 0f;
|
||||
vPushDir.y = (transform.position - mainCam.transform.position).normalized.y;
|
||||
vPushDir.z = joystick.Vertical;
|
||||
vPushDir.Normalize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user