Compare commits

..

No commits in common. "043c7142f77e4c3010e2f39ba89d99e6546824e0" and "7612251f7e591333f8c534a9a64ca164c8de6bad" have entirely different histories.

4 changed files with 9 additions and 47 deletions

View File

@ -707,7 +707,7 @@ PrefabInstance:
objectReference: {fileID: 1920006248}
- target: {fileID: 5108819328747686001, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3}
propertyPath: MaxVibration
value: 0.25
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 5150961666696654592, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3}
propertyPath: Volume
@ -1398,7 +1398,7 @@ PrefabInstance:
objectReference: {fileID: 1920006248}
- target: {fileID: 3389629528887116870, guid: 99a6ff8b9591949439b620b13bd249a4, type: 3}
propertyPath: MaxVibration
value: 0.25
value: 0.5
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []

View File

@ -27,7 +27,7 @@ public class EnemyPathFinding : MonoBehaviour
private void Rumble()
{
RumbleManager.StartRumble(-1, 0.5f, 0.5f, 0.25f);
RumbleManager.StartRumble(-1, 1f, 1f, 0.5f);
}
private void Update()

View File

@ -3,7 +3,6 @@ using UnityEngine.Events;
using TMPro;
using System;
using UnityUtils;
using System.Collections;
public class HealthComponent : MonoBehaviour, ISquezeDamageReceiver
{
@ -33,27 +32,6 @@ public class HealthComponent : MonoBehaviour, ISquezeDamageReceiver
void Awake()
{
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()

View File

@ -27,8 +27,10 @@ public class RopeRumbling : MonoBehaviour
{
this.enabled = false;
}
//StartCoroutine(RumbleLoop());
else
{
}
hasInit = true;
}
@ -40,25 +42,7 @@ public class RopeRumbling : MonoBehaviour
float ropeClamed = Mathf.Max(0, rope.Overshoot);
float sensitive_mapped = ropeClamed.Remap(0.2f, 1f, 0f, MaxVibration);
float mapped = ropeClamed.Remap(0.5f, 1f, 0f, MaxVibration);
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 mapped = ropeClamed.Remap(0.9f, 1f, 0f, MaxVibration);
RumbleManager.StartRumble(-1, 0, sensitive_mapped, 0.1f);
}
//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);
// }
//}
}