minor bug fixes, settings menu fixed, tutorial fixes

This commit is contained in:
sebastianhampel1 2023-05-18 00:08:40 -04:00
parent 7f2dc9d2e3
commit 461a297e12
17 changed files with 629 additions and 534 deletions

View File

@ -30,7 +30,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 0.11666667
value: 620.63
inSlope: 0
outSlope: 0
@ -58,7 +58,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 0.11666667
value: 200.8471
inSlope: 0
outSlope: 0
@ -67,7 +67,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2
time: 0.25
value: 400.85
inSlope: 0
outSlope: 0
@ -95,7 +95,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 0.11666667
value: 0
inSlope: 0
outSlope: 0
@ -104,7 +104,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2
time: 0.25
value: 0
inSlope: 0
outSlope: 0
@ -132,7 +132,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 0.11666667
value: 100.42201
inSlope: 0
outSlope: 0
@ -141,7 +141,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2
time: 0.25
value: 178.7
inSlope: 0
outSlope: 0
@ -178,7 +178,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 2
time: 0.25
value: 0
inSlope: Infinity
outSlope: Infinity
@ -215,7 +215,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 2
time: 0.25
value: 0
inSlope: Infinity
outSlope: Infinity
@ -252,7 +252,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 2
time: 0.25
value: 0
inSlope: Infinity
outSlope: Infinity
@ -280,7 +280,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 2
time: 0.25
value: 1
inSlope: Infinity
outSlope: Infinity
@ -308,7 +308,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 2
time: 0.25
value: 0
inSlope: Infinity
outSlope: Infinity
@ -400,7 +400,7 @@ AnimationClip:
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 2
m_StopTime: 0.25
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
@ -429,7 +429,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 0.11666667
value: 620.63
inSlope: 0
outSlope: 0
@ -457,7 +457,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 0.11666667
value: 200.8471
inSlope: 0
outSlope: 0
@ -466,7 +466,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2
time: 0.25
value: 400.85
inSlope: 0
outSlope: 0
@ -494,7 +494,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 0.11666667
value: 0
inSlope: 0
outSlope: 0
@ -503,7 +503,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2
time: 0.25
value: 0
inSlope: 0
outSlope: 0
@ -531,7 +531,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 0.11666667
value: 100.42201
inSlope: 0
outSlope: 0
@ -540,7 +540,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2
time: 0.25
value: 178.7
inSlope: 0
outSlope: 0
@ -577,7 +577,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 2
time: 0.25
value: 0
inSlope: Infinity
outSlope: Infinity
@ -614,7 +614,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 2
time: 0.25
value: 0
inSlope: Infinity
outSlope: Infinity
@ -651,7 +651,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 2
time: 0.25
value: 0
inSlope: Infinity
outSlope: Infinity
@ -679,7 +679,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 2
time: 0.25
value: 1
inSlope: Infinity
outSlope: Infinity
@ -707,7 +707,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 2
time: 0.25
value: 0
inSlope: Infinity
outSlope: Infinity

View File

@ -21,7 +21,7 @@ AnimationClip:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0.9
time: 0.13333334
value: 620.63
inSlope: 0
outSlope: 0
@ -30,7 +30,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2
time: 0.31666666
value: 120.6334
inSlope: 0
outSlope: 0
@ -58,7 +58,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.9
time: 0.13333334
value: 200.8471
inSlope: 0
outSlope: 0
@ -67,7 +67,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2
time: 0.31666666
value: 200.8471
inSlope: 0
outSlope: 0
@ -95,7 +95,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 2
time: 0.31666666
value: 1
inSlope: Infinity
outSlope: Infinity
@ -123,7 +123,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 2
time: 0.31666666
value: 1
inSlope: Infinity
outSlope: Infinity
@ -151,7 +151,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 2
time: 0.31666666
value: 1
inSlope: Infinity
outSlope: Infinity
@ -179,7 +179,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.9
time: 0.13333334
value: 0
inSlope: 0
outSlope: 0
@ -188,7 +188,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2
time: 0.31666666
value: 0
inSlope: 0
outSlope: 0
@ -216,7 +216,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.9
time: 0.13333334
value: 100.42201
inSlope: 0
outSlope: 0
@ -225,7 +225,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2
time: 0.31666666
value: 100.42201
inSlope: 0
outSlope: 0
@ -303,7 +303,7 @@ AnimationClip:
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 2
m_StopTime: 0.31666666
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
@ -323,7 +323,7 @@ AnimationClip:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0.9
time: 0.13333334
value: 620.63
inSlope: 0
outSlope: 0
@ -332,7 +332,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2
time: 0.31666666
value: 120.6334
inSlope: 0
outSlope: 0
@ -360,7 +360,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.9
time: 0.13333334
value: 200.8471
inSlope: 0
outSlope: 0
@ -369,7 +369,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2
time: 0.31666666
value: 200.8471
inSlope: 0
outSlope: 0
@ -397,7 +397,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 2
time: 0.31666666
value: 1
inSlope: Infinity
outSlope: Infinity
@ -425,7 +425,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 2
time: 0.31666666
value: 1
inSlope: Infinity
outSlope: Infinity
@ -453,7 +453,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 2
time: 0.31666666
value: 1
inSlope: Infinity
outSlope: Infinity
@ -481,7 +481,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.9
time: 0.13333334
value: 0
inSlope: 0
outSlope: 0
@ -490,7 +490,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2
time: 0.31666666
value: 0
inSlope: 0
outSlope: 0
@ -518,7 +518,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.9
time: 0.13333334
value: 100.42201
inSlope: 0
outSlope: 0
@ -527,7 +527,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2
time: 0.31666666
value: 100.42201
inSlope: 0
outSlope: 0

View File

@ -1150,7 +1150,7 @@ MonoBehaviour:
- m_Height: 2
m_Radius: 3
- m_Height: 0.4
m_Radius: 1.3
m_Radius: 3.77
m_LegacyHeadingBias: 3.4028235e+38
m_Rigs:
- {fileID: 365318976786001926}
@ -1881,6 +1881,8 @@ MonoBehaviour:
offset: {fileID: 1424249522}
cameraSpeed: 5
freelook: {fileID: 0}
initRadius: 3
aimingRadius: 2
--- !u!1 &365318978817215852
GameObject:
m_ObjectHideFlags: 0

File diff suppressed because it is too large Load Diff

View File

@ -28,8 +28,7 @@ public class SkinlessMonsterAnimator : MonoBehaviour
private float fastDeathduration = 1f;
[SerializeField]
private float deathDuration = 5f;
[SerializeField]
private string deathAnimationName = "PainScream";
// Start is called before the first frame update
@ -123,7 +122,7 @@ public void Kill(bool fast = false)
{
//animator.speed = 0;
InLight();
//animator.Play(this.deathAnimationName);
isAlive = false;
foreach(GameObject obj in this.objectsThatFallOnDeath)

View File

@ -44,7 +44,7 @@ public class SkinlessMonsterComponent : MonoBehaviour
private float timeSinceTarget = 0f;
private InGameManager manager;
private bool prePauseStoppedState = false;
//private bool prePauseStoppedState = false;
[SerializeField]
private BoxCollider leftHandDamage;

View File

@ -13,8 +13,8 @@ public class SwarmAnimator : MonoBehaviour
private Vector3 previousPosition;
[SerializeField]
private Rigidbody rb;
[SerializeField]
private string parameterName = "DeltaVector";
//[SerializeField]
//private string parameterName = "DeltaVector";
[SerializeField]
private Vector3 avoidancePosDefault;

View File

@ -19,13 +19,16 @@ public class InGameManager : MonoBehaviour
private bool isPaused = false;
private bool isTransitioning = false;
[SerializeField]
private float pauseTransitionDuration = 1f;
// [SerializeField]
//private float pauseTransitionDuration = 1f;
[SerializeField]
private Canvas gameCanvas;
[SerializeField]
private Canvas pausedCanvas;
[SerializeField]
private List<AudioSource> sounds = new List<AudioSource>();
private List<float> initSoundVolumes = new List<float>();
public bool IsPaused { get { return this.isPaused; } }
@ -99,7 +102,13 @@ IEnumerator pauseTransition()
}
public void SetVolume(float volume)
{
for (int i = 0;i<sounds.Count;i++)
{
sounds[i].volume = initSoundVolumes[i]*volume;
}
}
// Start is called before the first frame update
void Start()
{
@ -110,7 +119,12 @@ void Start()
pausedVolume.weight = 0;
gameCanvas.gameObject.SetActive(true);
pausedCanvas.gameObject.SetActive(false);
foreach (AudioSource source in sounds)
{
initSoundVolumes.Add(source.volume);
}
}
// Update is called once per frame
@ -119,7 +133,7 @@ void Update()
if (Input.GetButtonDown("Pause"))
{
this.TogglePause();
print("Toggled!");
}
if (isTransitioning||true)

View File

@ -12,7 +12,10 @@ public class InGameMenuManager : MonoBehaviour
private Animator menuAnimator;
[SerializeField]
private Scrollbar sensitivitySlider;
[SerializeField]
private Scrollbar volumeSlider;
private PlayerComponent player;
private InGameManager gameManager;
// Start is called before the first frame update
void Start()
@ -21,6 +24,7 @@ void Start()
settingsButton.onClick.AddListener(SettingsClicked);
returnToMenuButton.onClick.AddListener(SettingsUnClicked);
player = GameObject.FindObjectOfType(typeof(PlayerComponent)) as PlayerComponent;
gameManager = GameObject.FindObjectOfType<InGameManager>();
}
void SettingsClicked()
{
@ -33,7 +37,11 @@ void SettingsUnClicked()
}
public void UpdateSensitivity()
{
this.player.SetSensitivity(sensitivitySlider.value);
this.player.SetSensitivity(sensitivitySlider.value*4f);
}
public void UpdateVolume()
{
gameManager.SetVolume(volumeSlider.value*2);
}
// Update is called once per frame

View File

@ -7,8 +7,7 @@ public class ItemSelector : MonoBehaviour
[SerializeField]
private Camera cam;
private InteractableItem selected;
[SerializeField]
private bool debug = false;
[SerializeField]
private LayerMask mask;
public static ItemSelector instance;

View File

@ -11,8 +11,8 @@ public class BasicLevelProgressionSystem : MonoBehaviour
private WaypointMarker marker;
[SerializeField]
private PlayerComponent player;
[SerializeField]
private float minDist = 3;
//[SerializeField]
//private float minDist = 3;
[SerializeField]
private List<ProgressionSection> sections;

View File

@ -6,8 +6,8 @@
public class LevelZeroSpecial : MonoBehaviour
{
[SerializeField]
private int initalPlaceIndex = 0;
//[SerializeField]
//private int initalPlaceIndex = 0;
[SerializeField]
private DoorInteractable recepticleOne;
@ -70,8 +70,10 @@ void Update()
marker2Ref.target = recepticals[1].transform;
marker3Ref.target = recepticals[2].transform;
markers.Add(marker2Ref);
markers.Add(marker3Ref);
}
if (isEnabled)
{
@ -86,9 +88,9 @@ void Update()
WaypointMarker marker = markers[i];
if (marker.gameObject.activeInHierarchy)
{
if (marker.target = recepitcal.transform)
if (marker.target == recepitcal.transform)
{
marker.gameObject.SetActive(true);
marker.gameObject.SetActive(false);
markers.Remove(marker);
}
}

View File

@ -8,8 +8,8 @@
public class CameraController : MonoBehaviour
{
private float mouseX = 0;
private float mouseY;
//private float mouseX = 0;
//private float mouseY;
[SerializeField]
private Camera cam;
@ -24,10 +24,10 @@ public class CameraController : MonoBehaviour
public Vector3 Forward { get { return this.forward; } }
public Vector3 Right { get { return this.right; } }
private float originalDist = 0;
private float newDist = 0;
[SerializeField]
private bool isChild = false;
//private float originalDist = 0;
//private float newDist = 0;
//[SerializeField]
// private bool isChild = false;

View File

@ -15,7 +15,9 @@ public class CameraShift : MonoBehaviour
private float cameraSpeed = 5f;
[SerializeField]
private CinemachineFreeLook freelook;
[SerializeField]
private float initRadius = 3f;
[SerializeField]
private float aimingRadius = 2f;
//[SerializeField]
//private PlayerMovementController movementController;

View File

@ -17,13 +17,13 @@ public class PlayerAnimationController : MonoBehaviour
private float sideStepSpeed;
private bool isRunning;
private bool movementInterrupt = false;
//private bool movementInterrupt = false;
[SerializeField]
private PlayerInteractionHandler interactionHandler;
[SerializeField]
private PlayerMovementController movement;
private float verticalAiming = 0;
//private float verticalAiming = 0;
[SerializeField]
private Camera hiddenCam;

View File

@ -10,7 +10,7 @@ public class PlayerMovementController : MonoBehaviour
private float x = 0;
private float y = 0;
private float mouseX = 0;
//private float mouseX = 0;
private bool isRunning = false;
private bool isSneaking = false;
@ -71,7 +71,7 @@ private void GetMovementOld()
public void SetSensitivity(float sensitivity)
{
this.freelook.m_XAxis.m_MaxSpeed = initXSensitivity * sensitivity;
this.freelook.m_YAxis.m_MaxValue= initYSensitivity * sensitivity;
this.freelook.m_YAxis.m_MaxSpeed= initYSensitivity * sensitivity;
}
private void MovePlayer()
{
@ -110,7 +110,7 @@ void Start()
void Update()
{
if(isDead) return;
AllowRotation = Input.GetMouseButton(1) || Input.GetAxis("Aim")>0.5f;
AllowRotation = Input.GetMouseButton(1) || Input.GetAxis("Aim")>0.5f||IsRunning;
GetMovementOld();
MovePlayer();