Esempio n. 1
0
    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());
        }
    }
Esempio n. 2
0
 public static void RemoveFromList(PositionLogger obj)
 {
     physicalObjects.Remove(obj);
 }
Esempio n. 3
0
 public static void AddToList(PositionLogger obj)
 {
     physicalObjects.Add(obj);
 }
 static GeofenceHelper()
 {
     logger = new PositionLogger(LOG_FILE);
 }