using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Level1Manager : LevelManager
{
    // Start is called before the first frame update
    Vector3 orig;

    protected override void Start()
    {
        base.Start();
        orig = player.transform.position;
    }

    protected override bool WinCondition()
    {
        if(XZLengthSquare(player.transform.position,orig) > 100)
        {
            return true;
        }
        else
        {
            return false;
        }
    }

    float XZLengthSquare(Vector3 a, Vector3 b)
    {
        return (a.x - b.x) * (a.x - b.x) + (a.z - b.z) * (a.z - b.z);
    }
}
