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

View File

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

View File

@ -1150,7 +1150,7 @@ MonoBehaviour:
- m_Height: 2 - m_Height: 2
m_Radius: 3 m_Radius: 3
- m_Height: 0.4 - m_Height: 0.4
m_Radius: 1.3 m_Radius: 3.77
m_LegacyHeadingBias: 3.4028235e+38 m_LegacyHeadingBias: 3.4028235e+38
m_Rigs: m_Rigs:
- {fileID: 365318976786001926} - {fileID: 365318976786001926}
@ -1881,6 +1881,8 @@ MonoBehaviour:
offset: {fileID: 1424249522} offset: {fileID: 1424249522}
cameraSpeed: 5 cameraSpeed: 5
freelook: {fileID: 0} freelook: {fileID: 0}
initRadius: 3
aimingRadius: 2
--- !u!1 &365318978817215852 --- !u!1 &365318978817215852
GameObject: GameObject:
m_ObjectHideFlags: 0 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; private float fastDeathduration = 1f;
[SerializeField] [SerializeField]
private float deathDuration = 5f; private float deathDuration = 5f;
[SerializeField]
private string deathAnimationName = "PainScream";
// Start is called before the first frame update // Start is called before the first frame update
@ -123,7 +122,7 @@ public void Kill(bool fast = false)
{ {
//animator.speed = 0; //animator.speed = 0;
InLight(); InLight();
//animator.Play(this.deathAnimationName);
isAlive = false; isAlive = false;
foreach(GameObject obj in this.objectsThatFallOnDeath) foreach(GameObject obj in this.objectsThatFallOnDeath)

View File

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

View File

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

View File

@ -19,13 +19,16 @@ public class InGameManager : MonoBehaviour
private bool isPaused = false; private bool isPaused = false;
private bool isTransitioning = false; private bool isTransitioning = false;
[SerializeField] // [SerializeField]
private float pauseTransitionDuration = 1f; //private float pauseTransitionDuration = 1f;
[SerializeField] [SerializeField]
private Canvas gameCanvas; private Canvas gameCanvas;
[SerializeField] [SerializeField]
private Canvas pausedCanvas; 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; } } 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 // Start is called before the first frame update
void Start() void Start()
{ {
@ -111,6 +120,11 @@ void Start()
gameCanvas.gameObject.SetActive(true); gameCanvas.gameObject.SetActive(true);
pausedCanvas.gameObject.SetActive(false); pausedCanvas.gameObject.SetActive(false);
foreach (AudioSource source in sounds)
{
initSoundVolumes.Add(source.volume);
}
} }
// Update is called once per frame // Update is called once per frame
@ -119,7 +133,7 @@ void Update()
if (Input.GetButtonDown("Pause")) if (Input.GetButtonDown("Pause"))
{ {
this.TogglePause(); this.TogglePause();
print("Toggled!");
} }
if (isTransitioning||true) if (isTransitioning||true)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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