Beispiel #1
0
    void TrapEffect()                   // trap forces player to get up in level (closer to enemy follower)
    {
        trap.Play(0);
        float curPos = transform.position.x;

        if (curPos == Level1.transform.position.x)
        {
            curLevel = 2;
            xOffset  = -2;
        }
        if (curPos == Level2.transform.position.x)
        {
            curLevel = 3;
            xOffset  = -2;
        }
        if (curPos == Level3.transform.position.x)
        {
            deathManager.death();
        }
    }