Fixed thingy
This commit is contained in:
@@ -20,7 +20,7 @@ namespace InterfaceOff.WorldScene
|
||||
body = GetComponent<Rigidbody>();
|
||||
|
||||
Vector3 pos = transform.localPosition;
|
||||
pos.y = Mathf.Infinity;
|
||||
pos.y = 100f;
|
||||
transform.localPosition = pos;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user