Made damage affect the player

This commit is contained in:
Pasha Bibko
2026-01-29 10:49:18 +00:00
parent aff8f8e4e7
commit 4ee328914a
5 changed files with 290 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ namespace InterfaceOff.WorldScene
[SerializeField] private GameObject HurtOverlay;
[SerializeField] private Slider SliderThing;
[SerializeField] private WindowSpawner Spawner;
[SerializeField] private GameObject HittyThingThatSkyDidntWantMeToNameItLikeThisAndInsteadNameItPropely;
[field: SerializeField] public int HitsTaken { get; private set; }
@@ -24,6 +25,20 @@ namespace InterfaceOff.WorldScene
transform.localPosition = pos;
}
private void Update()
{
float kjjjjgkjdfh = HitsTaken * 5f;
kjjjjgkjdfh = Mathf.Clamp(kjjjjgkjdfh, 0f, 100);
if (!Spawner.AutoSpawn)
{
return;
}
HittyThingThatSkyDidntWantMeToNameItLikeThisAndInsteadNameItPropely.transform.localScale =
new Vector3(90, kjjjjgkjdfh, 90);
}
void LateUpdate()
{
if (Spawner.AutoSpawn)

View File

@@ -95,7 +95,7 @@ namespace InterfaceOff
public void AlertOfDespawnedWindow() => SpawnedWindowCount--;
private int SpawnyThingyMajig = 900; // Sky chose dis
private int SpawnyThingyMajig = 9000; // Sky chose dis
private void FixedUpdate()
{
@@ -106,7 +106,7 @@ namespace InterfaceOff
if (SpawnyThingyMajig == 0)
{
PasswordField.SetActive(true);
SpawnyThingyMajig = Random.Range(200, 1000);
SpawnyThingyMajig = Random.Range(2000, 10000);
}
else
{