add some extra assets FX and SFX
This commit is contained in:
@@ -5,7 +5,6 @@ using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.UI;
|
||||
using static UnityEngine.GraphicsBuffer;
|
||||
|
||||
public class playerCamera : cameraControllerManager
|
||||
{
|
||||
@@ -2015,6 +2014,19 @@ public class playerCamera : cameraControllerManager
|
||||
lookCameraDirection.localPosition = new Vector3 (0, lookCameraDirection.localPosition.y, 0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (useTopDownView) {
|
||||
if (currentLockedCameraAxisInfo.showCameraCursorWhenNotAiming) {
|
||||
if (!lookingAtPoint && !lookingAtTarget) {
|
||||
if (!playerIsBusy () && playerControllerManager.canPlayerMove ()) {
|
||||
|
||||
setLookDirection = true;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
currentCameraMovementPosition = vector3Zero;
|
||||
@@ -2926,7 +2938,7 @@ public class playerCamera : cameraControllerManager
|
||||
horizontalCameraLimitActiveOnAir = state;
|
||||
}
|
||||
|
||||
public float getCurrentDeltaTime ()
|
||||
float getCurrentDeltaTime ()
|
||||
{
|
||||
currentDeltaTime = Time.deltaTime;
|
||||
|
||||
@@ -2945,6 +2957,25 @@ public class playerCamera : cameraControllerManager
|
||||
return currentDeltaTime;
|
||||
}
|
||||
|
||||
float getCurrentFixedDeltaTime ()
|
||||
{
|
||||
float currentFixedDeltaTime = Time.fixedDeltaTime;
|
||||
|
||||
if (regularMovementOnBulletTime) {
|
||||
currentScaleTime = GKC_Utils.getCurrentDeltaTime ();
|
||||
|
||||
if (useUnscaledTimeOnBulletTime) {
|
||||
if (currentScaleTime < 1) {
|
||||
currentFixedDeltaTime = Time.unscaledDeltaTime;
|
||||
}
|
||||
} else {
|
||||
currentFixedDeltaTime *= currentScaleTime;
|
||||
}
|
||||
}
|
||||
|
||||
return currentFixedDeltaTime;
|
||||
}
|
||||
|
||||
public void setShotCameraNoise (Vector2 noiseAmount)
|
||||
{
|
||||
shotCameraNoise = noiseAmount;
|
||||
@@ -3203,7 +3234,7 @@ public class playerCamera : cameraControllerManager
|
||||
|
||||
if (!isCameraTypeFree ()) {
|
||||
if (!driving) {
|
||||
followPlayerPositionOnLockedCamera (currentFixedUpdateDeltaTime);
|
||||
followPlayerPositionOnLockedCamera (getCurrentFixedDeltaTime ());
|
||||
}
|
||||
} else {
|
||||
updateSmoothPlayerCameraPosition ();
|
||||
@@ -3422,8 +3453,12 @@ public class playerCamera : cameraControllerManager
|
||||
lockedCameraPivot.position = new Vector3 (lockedCameraPivot.position.x, newVerticalPosition, newHorizontalPosition);
|
||||
}
|
||||
} else {
|
||||
lockedCameraPivot.position = Vector3.SmoothDamp (lockedCameraPivot.position,
|
||||
targetPosition, ref lockedCameraFollowPlayerPositionVelocity, currentLockedCameraAxisInfo.followPlayerPositionSpeed);
|
||||
if (currentLockedCameraAxisInfo.useSmoothDampToFollowPlayerPosition) {
|
||||
lockedCameraPivot.position = Vector3.SmoothDamp (lockedCameraPivot.position,
|
||||
targetPosition, ref lockedCameraFollowPlayerPositionVelocity, currentLockedCameraAxisInfo.followPlayerPositionSpeed);
|
||||
} else {
|
||||
lockedCameraPivot.position = Vector3.Lerp (lockedCameraPivot.position, targetPosition, deltaTimeToUse * currentLockedCameraAxisInfo.followPlayerPositionSpeed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3805,6 +3840,7 @@ public class playerCamera : cameraControllerManager
|
||||
|
||||
IEnumerator resetPivotCameraTransformLocalRotationCoroutine ()
|
||||
{
|
||||
|
||||
pauseOrPlayCamera (false);
|
||||
|
||||
changeCameraRotationState (false);
|
||||
@@ -4069,7 +4105,10 @@ public class playerCamera : cameraControllerManager
|
||||
cameraTransformPosition = playerCameraTransform.position + currentPivotPositionCenter;
|
||||
currentPivotPositionOffset = currentState.pivotPositionOffset;
|
||||
|
||||
directionFromMainPositionToPivot = pivotCameraTransform.position - cameraTransformPosition;
|
||||
//directionFromMainPositionToPivot = pivotCameraTransform.position - cameraTransformPosition;
|
||||
|
||||
directionFromMainPositionToPivot = playerCameraTransform.up;
|
||||
|
||||
distanceToPivotPositionOffset = GKC_Utils.distance (currentPivotPositionOffset, currentPivotPositionCenter);
|
||||
|
||||
if (cameraCollisionAlwaysActive || currentState.cameraCollisionActive) {
|
||||
@@ -4193,7 +4232,7 @@ public class playerCamera : cameraControllerManager
|
||||
|
||||
previousLockedCameraAxisTransform = null;
|
||||
|
||||
playerControllerManager.setLockedCameraState (false, false, false, true);
|
||||
playerControllerManager.setLockedCameraState (false, false, false, true, false);
|
||||
|
||||
weaponsManager.setLockedCameraActiveState (false);
|
||||
|
||||
@@ -4268,7 +4307,7 @@ public class playerCamera : cameraControllerManager
|
||||
|
||||
previousLockedCameraAxisTransform = null;
|
||||
|
||||
playerControllerManager.setLockedCameraState (false, false, false, true);
|
||||
playerControllerManager.setLockedCameraState (false, false, false, true, false);
|
||||
|
||||
weaponsManager.setLockedCameraActiveState (false);
|
||||
|
||||
@@ -4549,7 +4588,9 @@ public class playerCamera : cameraControllerManager
|
||||
}
|
||||
|
||||
playerControllerManager.setLockedCameraState (true, currentLockedCameraAxisInfo.useTankControls,
|
||||
currentLockedCameraAxisInfo.useRelativeMovementToLockedCamera, currentLockedCameraAxisInfo.playerCanMoveOnAimInTankMode);
|
||||
currentLockedCameraAxisInfo.useRelativeMovementToLockedCamera,
|
||||
currentLockedCameraAxisInfo.playerCanMoveOnAimInTankMode,
|
||||
currentLockedCameraAxisInfo.keepCameraRelativeMovementWhenNotAiming);
|
||||
|
||||
followSplinePathForPlayerPosition = currentLockedCameraAxisInfo.followSplinePathForPlayerPosition;
|
||||
|
||||
@@ -5788,6 +5829,10 @@ public class playerCamera : cameraControllerManager
|
||||
settingShowCameraCursorWhenNotAimingBackToActive = false;
|
||||
} else {
|
||||
setLookAtTargetStateManual (state, null);
|
||||
|
||||
if (!state) {
|
||||
setTargetToLook (null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user