Beispiel #1
0
    void HallTriggerHandler(object o, System.EventArgs e)
    {
        HallSection h = (HallSection)o;

        if (!infinitized)
        {
            if (h == halls[midpoint])
            {
                infinitize();
            }
            else
            {
                return;
            }
        }

        if (h == posTrigger)
        {
            popLeft();
            SpawnHall(ZDir.Positive);
        }
        else if (h == negTrigger)
        {
            popRight();
            SpawnHall(ZDir.Negative);
        }
    }
Beispiel #2
0
    void scaleFog()
    {
        HallSection farPoint      = halls[midpoint * 2];
        float       distanceAlong = Mathf.Abs(farPoint.transform.position.z - PlayerMove.Instance.transform.position.z);

        FogManager.Instance.SetFogDistance(distanceAlong);
    }