Skip to content

Commit

Permalink
feat: chelicerate movement
Browse files Browse the repository at this point in the history
  • Loading branch information
pyoneerC committed Sep 26, 2024
1 parent cd421ca commit f7a361d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 140 deletions.
26 changes: 13 additions & 13 deletions Assets/Scenes/Reparation.unity
Original file line number Diff line number Diff line change
Expand Up @@ -25639,7 +25639,7 @@ PrefabInstance:
addedObject: {fileID: 1153932945}
- targetCorrespondingSourceObject: {fileID: -5609321221556402741, guid: d9ff58e3d94324345b590825be096953, type: 3}
insertIndex: -1
addedObject: {fileID: 1153932946}
addedObject: {fileID: 1153932948}
m_SourcePrefab: {fileID: 9199261849990390558, guid: d9ff58e3d94324345b590825be096953, type: 3}
--- !u!1 &1153932944 stripped
GameObject:
Expand Down Expand Up @@ -25667,7 +25667,12 @@ SphereCollider:
serializedVersion: 3
m_Radius: 0.25
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &1153932946
--- !u!4 &1153932947 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5146681718063874739, guid: d9ff58e3d94324345b590825be096953, type: 3}
m_PrefabInstance: {fileID: 1153932943}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1153932948
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
Expand All @@ -25676,19 +25681,14 @@ MonoBehaviour:
m_GameObject: {fileID: 1153932944}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6cd190f2ed0638945954a157b7b78d1a, type: 3}
m_Script: {fileID: 11500000, guid: 77df7a834c991ce4c966b3383d967636, type: 3}
m_Name:
m_EditorClassIdentifier:
swimSpeed: 3
swimRadius: 100
damage: 10
changeDirectionInterval: 10
rotationSpeed: 50
--- !u!4 &1153932947 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5146681718063874739, guid: d9ff58e3d94324345b590825be096953, type: 3}
m_PrefabInstance: {fileID: 1153932943}
m_PrefabAsset: {fileID: 0}
splineObject: {fileID: 557190188}
swimSpeed: 1
rotationSpeed: 5
loop: 1
rotationOffset: {x: -90, y: 0, z: 0}
--- !u!1001 &1155032072
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down
126 changes: 0 additions & 126 deletions Assets/Scripts/Creatures/Chelicerate.cs

This file was deleted.

15 changes: 14 additions & 1 deletion Assets/Scripts/UI/Endgame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ private void EndGame(bool isVictory)

UpdateUI();

DisablePlayerInput();

SetTextVisibility(true);
SetExplanationTextVisibility(1f);

Expand All @@ -125,6 +127,17 @@ private void EndGame(bool isVictory)
healthCountExplanation.gameObject.SetActive(false);
}

private void DisablePlayerInput()
{
var player = GameObject.FindWithTag("Player");

if (player == null) return;

var playerMovement = player.GetComponent<FirstPersonController>();
playerMovement.enabled = false;
}


private void UpdateUI()
{
scoreText.text = $"{_score}";
Expand All @@ -138,7 +151,7 @@ private void UpdateUI()

restartButton.interactable = true;
quitButton.interactable = true;

restartButton.onClick.AddListener(() => { UnityEngine.SceneManagement.SceneManager.LoadScene(0); });
quitButton.onClick.AddListener(Application.Quit);
}
Expand Down

0 comments on commit f7a361d

Please sign in to comment.