private void OnTriggerEnterEvent(Collider2D col) { if (col.CompareTag("TimeSector")) { canManipulate = true; TimeBound colTimeBound = col.GetComponent <TimeBound>(); StartCoroutine(_timeBarManager.IncreaseTime(colTimeBound.sectionTime)); //Having a higher functioning machine leads to a disadvantage as time is decreased per frame. Fixed framerate of 120fps now //StartCoroutine(_timeBarManager.IncreaseTime(Mathf.FloorToInt(colTimeBound.sectionTime / (Time.smoothDeltaTime * 30)))); colTimeBound.SetBound(); boundTrek.Add(colTimeBound); if (colTimeBound.usePopText) { StartCoroutine(DisplayText(colTimeBound.popText)); colTimeBound.usePopText = false; } StartCoroutine(CameraZoom(colTimeBound.cameraSize)); } if (col.CompareTag("Collectable")) { PositionLogger collectableLogger = col.GetComponent <PositionLogger>(); if (!collectableLogger.collected) { StartCoroutine(_timeBarManager.IncreaseTime(_timeBarManager.CurrentTime + collectableLogger.collectableTime)); collectableLogger.collected = true; col.GetComponent <MeshRenderer>().enabled = false; } } if (col.CompareTag("Checkpoint")) { currentCheckpoint = col.transform; boundTrek.Clear(); StartCoroutine(FadeRestartText()); } }
public static void RemoveFromList(PositionLogger obj) { physicalObjects.Remove(obj); }
public static void AddToList(PositionLogger obj) { physicalObjects.Add(obj); }
static GeofenceHelper() { logger = new PositionLogger(LOG_FILE); }