Fixed thingy

This commit is contained in:
Pasha Bibko
2026-01-29 10:31:07 +00:00
parent 96a75af6a1
commit aff8f8e4e7
3 changed files with 27 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ namespace InterfaceOff.WorldScene
body = GetComponent<Rigidbody>();
Vector3 pos = transform.localPosition;
pos.y = Mathf.Infinity;
pos.y = 100f;
transform.localPosition = pos;
}

View File

@@ -95,17 +95,24 @@ namespace InterfaceOff
public void AlertOfDespawnedWindow() => SpawnedWindowCount--;
private int SpawnyThingyMajig = 900; // Sky chose dis
private void FixedUpdate()
{
/* Spawns new windows whilst active */
if (AutoSpawn)
{
/* Has a random choice for the PasswordField to show up */
if (Random.Range(0, 1000) == 500)
if (SpawnyThingyMajig == 0)
{
PasswordField.SetActive(true);
SpawnyThingyMajig = Random.Range(200, 1000);
}
else
{
SpawnyThingyMajig--;
}
/* Calculates the current max spawn time */
const int TICKS_PER_SECOND = 20; // Unity constant
const int MIN_SPAWN_TIME = 2 * TICKS_PER_SECOND;