Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
3ac2466bd4
|
@ -221,10 +221,10 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_UiScaleMode: 0
|
m_UiScaleMode: 1
|
||||||
m_ReferencePixelsPerUnit: 100
|
m_ReferencePixelsPerUnit: 100
|
||||||
m_ScaleFactor: 1
|
m_ScaleFactor: 1
|
||||||
m_ReferenceResolution: {x: 800, y: 600}
|
m_ReferenceResolution: {x: 1920, y: 108}
|
||||||
m_ScreenMatchMode: 0
|
m_ScreenMatchMode: 0
|
||||||
m_MatchWidthOrHeight: 0
|
m_MatchWidthOrHeight: 0
|
||||||
m_PhysicalUnit: 3
|
m_PhysicalUnit: 3
|
||||||
|
@ -900,7 +900,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!224 &1907822959
|
--- !u!224 &1907822959
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -707,7 +707,7 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 1920006248}
|
objectReference: {fileID: 1920006248}
|
||||||
- target: {fileID: 5108819328747686001, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3}
|
- target: {fileID: 5108819328747686001, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3}
|
||||||
propertyPath: MaxVibration
|
propertyPath: MaxVibration
|
||||||
value: 0.5
|
value: 0.25
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5150961666696654592, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3}
|
- target: {fileID: 5150961666696654592, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3}
|
||||||
propertyPath: Volume
|
propertyPath: Volume
|
||||||
|
@ -1153,6 +1153,81 @@ SpriteRenderer:
|
||||||
m_WasSpriteAssigned: 1
|
m_WasSpriteAssigned: 1
|
||||||
m_MaskInteraction: 0
|
m_MaskInteraction: 0
|
||||||
m_SpriteSortPoint: 0
|
m_SpriteSortPoint: 0
|
||||||
|
--- !u!1 &1230350817
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1230350818}
|
||||||
|
- component: {fileID: 1230350820}
|
||||||
|
- component: {fileID: 1230350819}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Panel
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1230350818
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1230350817}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0.5, y: 0.7, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 4158834148864819268}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1230350819
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1230350817}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 0.392}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_Type: 1
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
||||||
|
--- !u!222 &1230350820
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1230350817}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
--- !u!1001 &1232208432
|
--- !u!1001 &1232208432
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -1323,7 +1398,7 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 1920006248}
|
objectReference: {fileID: 1920006248}
|
||||||
- target: {fileID: 3389629528887116870, guid: 99a6ff8b9591949439b620b13bd249a4, type: 3}
|
- target: {fileID: 3389629528887116870, guid: 99a6ff8b9591949439b620b13bd249a4, type: 3}
|
||||||
propertyPath: MaxVibration
|
propertyPath: MaxVibration
|
||||||
value: 0.5
|
value: 0.25
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
|
@ -3422,15 +3497,48 @@ PrefabInstance:
|
||||||
propertyPath: m_LocalEulerAnglesHint.z
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6216580377014392011, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 7301411897347746173, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
- target: {fileID: 7301411897347746173, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: UI
|
value: UI
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
m_AddedGameObjects: []
|
m_AddedGameObjects:
|
||||||
m_AddedComponents: []
|
- targetCorrespondingSourceObject: {fileID: 2603779566095873902, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 1230350818}
|
||||||
|
m_AddedComponents:
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 7301411897347746173, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 4158834148864819269}
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
||||||
|
--- !u!1 &4158834148864819267 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 7301411897347746173, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 4158834148864819266}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!224 &4158834148864819268 stripped
|
||||||
|
RectTransform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 2603779566095873902, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 4158834148864819266}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!114 &4158834148864819269
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4158834148864819267}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 3c20bad5f6ef76d429d398dfba893d40, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
pauseMenuUI: {fileID: 1230350817}
|
||||||
--- !u!1001 &4910321061857220295
|
--- !u!1001 &4910321061857220295
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class EnemyPathFinding : MonoBehaviour
|
||||||
|
|
||||||
private void Rumble()
|
private void Rumble()
|
||||||
{
|
{
|
||||||
RumbleManager.StartRumble(-1, 1f, 1f, 0.5f);
|
RumbleManager.StartRumble(-1, 0.5f, 0.5f, 0.25f);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
|
|
|
@ -3,6 +3,7 @@ using UnityEngine.Events;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using System;
|
using System;
|
||||||
using UnityUtils;
|
using UnityUtils;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
public class HealthComponent : MonoBehaviour, ISquezeDamageReceiver
|
public class HealthComponent : MonoBehaviour, ISquezeDamageReceiver
|
||||||
{
|
{
|
||||||
|
@ -32,6 +33,27 @@ public class HealthComponent : MonoBehaviour, ISquezeDamageReceiver
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
currentHealth = maxHealth;
|
currentHealth = maxHealth;
|
||||||
|
OnHealthChange.AddListener((_, _) => showRedTint = 1);
|
||||||
|
StartCoroutine(RedTintLoop());
|
||||||
|
}
|
||||||
|
|
||||||
|
float showRedTint = 0;
|
||||||
|
private IEnumerator RedTintLoop()
|
||||||
|
{
|
||||||
|
SpriteRenderer sr = GetComponentInChildren<SpriteRenderer>();
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
if (showRedTint < 0.1f)
|
||||||
|
{
|
||||||
|
yield return new WaitForSecondsRealtime(0.1f);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
sr.color = Color.red;
|
||||||
|
yield return new WaitForSecondsRealtime(0.1f);
|
||||||
|
sr.color = Color.white;
|
||||||
|
yield return new WaitForSecondsRealtime(0.1f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
|
|
|
@ -17,7 +17,7 @@ public class PlayerAnimationHandler : MonoBehaviour
|
||||||
}
|
}
|
||||||
public void Run(bool state)
|
public void Run(bool state)
|
||||||
{
|
{
|
||||||
animator.SetBool("IsRunning", state);
|
animator.SetBool("RunMop", state);
|
||||||
}
|
}
|
||||||
public void Swing(bool state)
|
public void Swing(bool state)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,10 +27,8 @@ public class RopeRumbling : MonoBehaviour
|
||||||
{
|
{
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
//StartCoroutine(RumbleLoop());
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
hasInit = true;
|
hasInit = true;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +40,25 @@ public class RopeRumbling : MonoBehaviour
|
||||||
|
|
||||||
float ropeClamed = Mathf.Max(0, rope.Overshoot);
|
float ropeClamed = Mathf.Max(0, rope.Overshoot);
|
||||||
float sensitive_mapped = ropeClamed.Remap(0.2f, 1f, 0f, MaxVibration);
|
float sensitive_mapped = ropeClamed.Remap(0.2f, 1f, 0f, MaxVibration);
|
||||||
float mapped = ropeClamed.Remap(0.9f, 1f, 0f, MaxVibration);
|
float mapped = ropeClamed.Remap(0.5f, 1f, 0f, MaxVibration);
|
||||||
RumbleManager.StartRumble(-1, 0, sensitive_mapped, 0.1f);
|
RumbleManager.StartRumble(-1, mapped, sensitive_mapped, 0.1f);
|
||||||
|
|
||||||
|
//float ropeClamed = Mathf.Max(0, rope.Overshoot);
|
||||||
|
//float sensitive_mapped = ropeClamed.Remap(0.2f, 0.8f, 0f, MaxVibration);
|
||||||
|
//float mapped = ropeClamed.Remap(0.9f, 1f, 0f, MaxVibration);
|
||||||
|
//rumbleStrength = sensitive_mapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//float rumbleStrength = 0;
|
||||||
|
//private IEnumerator RumbleLoop()
|
||||||
|
//{
|
||||||
|
// while (true)
|
||||||
|
// {
|
||||||
|
// if (rumbleStrength > 0.1f)
|
||||||
|
// {
|
||||||
|
// RumbleManager.StartRumble(-1, 0, rumbleStrength, 0.025f);
|
||||||
|
// }
|
||||||
|
// yield return new WaitForSecondsRealtime(0.2f);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.InputSystem;
|
||||||
|
public class PauseMenu : MonoBehaviour
|
||||||
|
{
|
||||||
|
public GameObject pauseMenuUI;
|
||||||
|
|
||||||
|
Gamepad pad;
|
||||||
|
|
||||||
|
// Variable to keep track of the game's pause state
|
||||||
|
private bool isPaused = false;
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
if (pauseMenuUI.activeSelf)
|
||||||
|
pauseMenuUI.SetActive(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
//for (int i = 0; i < Gamepad.all.Count; i++)
|
||||||
|
// if(Gamepad.all[i].selectButton)
|
||||||
|
|
||||||
|
|
||||||
|
// Check if the Escape key is pressed
|
||||||
|
if (Input.GetKeyDown(KeyCode.Escape))
|
||||||
|
{
|
||||||
|
if (isPaused)
|
||||||
|
{
|
||||||
|
ResumeGame();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PauseGame();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Method to resume the game
|
||||||
|
public void ResumeGame()
|
||||||
|
{
|
||||||
|
// Hide the pause menu
|
||||||
|
pauseMenuUI.SetActive(false);
|
||||||
|
|
||||||
|
// Set the time scale to 1 to resume normal gameplay
|
||||||
|
Time.timeScale = 1f;
|
||||||
|
|
||||||
|
// Update the pause state
|
||||||
|
isPaused = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Method to pause the game
|
||||||
|
public void PauseGame()
|
||||||
|
{
|
||||||
|
// Show the pause menu
|
||||||
|
pauseMenuUI.SetActive(true);
|
||||||
|
|
||||||
|
// Set the time scale to 0 to pause the game
|
||||||
|
Time.timeScale = 0f;
|
||||||
|
|
||||||
|
// Update the pause state
|
||||||
|
isPaused = true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3c20bad5f6ef76d429d398dfba893d40
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue