Skip to content

Commit

Permalink
cleaned up code
Browse files Browse the repository at this point in the history
  • Loading branch information
TPlemur committed Sep 12, 2023
1 parent c8e72b0 commit 98dd4f8
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public enum seekerState
seek
}

[SerializeField] float startDelay = 0.02f;
//[SerializeField] float startDelay = 0.02f;
[SerializeField] Material flashMat;
[SerializeField] Material baseMat;
MeshRenderer vineRender;
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/AI Related/PatrolBehaviour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public Vector3 RandomNavmeshLocation(float radius) {
if (NavMesh.SamplePosition(randomDirection, out NavMeshEnemy, radius, 1)) {
foreach(GameObject i in hidingHoles){ // For every hiding hole
float distance = Vector3.Distance(i.transform.position, NavMeshEnemy.position);
Debug.Log("Distance: " + distance);
//Debug.Log("Distance: " + distance);
if(distance <= 5){
tooCloseToPlayer = true;
}
Expand Down
10 changes: 1 addition & 9 deletions Assets/Scripts/Items And Inventory/InventoryManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,13 @@ void Update()

//update outlines as necessasary
//CheckOutlines();
// cycle left and right
// cycle left and right on pvtm cam
if (Input.GetKeyDown(KeyMapper.cycleRightKey))
{
if (inventory.EquippedIsToggled() && inventory.EquippedIsPVTM())
{
inventory.equipped.CycleRight();
}
// else
// {
// inventory.CycleRight();
// }
}

else if (Input.GetKeyDown(KeyMapper.cycleLeftKey))
Expand All @@ -106,10 +102,6 @@ void Update()
{
inventory.equipped.CycleLeft();
}
// else
// {
// inventory.CycleLeft();
// }
}

// left click
Expand Down
15 changes: 0 additions & 15 deletions Assets/Scripts/Items And Inventory/Items/PVTM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,7 @@ public override void Primary(){
obj.GetComponent<Collider>().enabled = false;
activeCams.Add(obj);
current = activeCams.Count - 1;
//currentCam = activeCams[activeCams.Count - 1];
ConnectCurrent();
//real.transform.SetParent(obj.transform);
//real.transform.localPosition = obj.transform.GetChild(0).gameObject.transform.localPosition;
//real.transform.localRotation = obj.transform.GetChild(0).gameObject.transform.localRotation;
//real.GetComponent<Camera>().fieldOfView = currentCam.GetComponent<Camera>().fieldOfView;
CameraWhirUpSFX(obj);
StartCoroutine(cameraDeactivationTimer(activeCams.Count - 1));
}
Expand Down Expand Up @@ -147,12 +142,7 @@ public override void Secondary(){
public override void CycleRight(){
if(activeCams.Count > 1){
current += current == activeCams.Count - 1 ? -1 * (activeCams.Count - 1) : 1;
//currentCam = activeCams[current];
ConnectCurrent();
//real.transform.SetParent(currentCam.transform);
//real.transform.localPosition = currentCam.transform.GetChild(0).gameObject.transform.localPosition;
//real.transform.localRotation = currentCam.transform.GetChild(0).gameObject.transform.localRotation;
//real.GetComponent<Camera>().fieldOfView = currentCam.GetComponent<Camera>().fieldOfView;
CameraChangeSFX();
}
}
Expand All @@ -162,12 +152,7 @@ public override void CycleRight(){
public override void CycleLeft(){
if(activeCams.Count > 1){
current -= current == 0 ? -1 * (activeCams.Count - 1) : 1;
//currentCam = activeCams[current];
ConnectCurrent();
//real.transform.SetParent(currentCam.transform);
//real.transform.localPosition = currentCam.transform.GetChild(0).gameObject.transform.localPosition;
//real.transform.localRotation = currentCam.transform.GetChild(0).gameObject.transform.localRotation;
//real.GetComponent<Camera>().fieldOfView = currentCam.GetComponent<Camera>().fieldOfView;
CameraChangeSFX();
}
}
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/UI Related/psxChanger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void PSXSetQuality(float value)
psx.Release();
psx.width = (int)(142 * value);
psx.height = (int)(80 * value);
if (hasOffice) { officeCam.fieldOfView = DoorCode.camRes[(int)value];PVTM.resupdate = true; }
if (hasOffice) { officeCam.fieldOfView = DoorCode.camRes[(int)value]; PVTM.resupdate = true; }
PlayerPrefs.SetFloat("psxQuality", value);
PlayerPrefs.Save();
}
Expand Down

0 comments on commit 98dd4f8

Please sign in to comment.