void Start()
{
normalSpeed = defaultSpeed;
clickPosition = new Vector2(0f, 0f);
screenWidth = new Vector2((float)Screen.width, 0f);
edgeLeft = new Vector2(screenWidth.x * EDGEBUFFER, 0f);
edgeRight = new Vector2(screenWidth.x - edgeLeft.x, 0f);
sprite = GetComponent<SpriteRenderer>();
slowMoSpeed = normalSpeed / 2;
sprintSpeed = normalSpeed * 2;
wallR = GameObject.Find("RightWall");
wallL = GameObject.Find("LeftWall");
/////
anim = this.GetComponent<Animator>();
anim.SetBool("FacingRight", facingRight);
initialColor = sprite.color;
slowMo = false; //slowMo starts out as false since the player hasn't hit the button yet
// Formula to calculate the hunter duration
Debug.Log("Stage Level: " + Application.loadedLevel);
if(Application.loadedLevelName == "Ending Level" || Application.loadedLevelName == "Tutorial Stage" || Application.loadedLevelName == "Nightmare")
{
standardLevel = false;
}
// What is 40?
// Application.loadedLevel requires that the levels be set in the build in a particular order, this is dangerous.
hunterInactiveDuration = 40 - 10 * (Application.loadedLevel - 3);
// What is 8? Should probably be a constant variable
if (hunterInactiveDuration < 8)
hunterInactiveDuration = 8;
}