コード例 #1
0
    private void Update()
    {
        var ll = LevelTrack.indexToString(Application.loadedLevel);

        if (ll.Equals("StartPage") || ll.Equals("Phone") || ll.Equals("HomeTV") || ll.Equals("Credits") ||
            ll.Equals("Instructions_1") || ll.Equals("Instructions_2") || ll.Equals("Instructions_3") ||
            ll.Equals("Instructions_4") || ll.Equals("Instructions_5") || ll.Equals("Computer") ||
            ll.Equals("4D") || ll.Equals("CompleteQuest") || ll.Equals("FailQuest") || ll.Equals("ExitQuest") ||
            ll.Equals("EndGame") || ll.Equals("Phone") || ll.Equals("HomeTV") || ll.Equals("Menu") ||
            ll.Equals("Instructions_6") || ll.Equals("Instructions_7") || ll.Equals("Instructions_8"))
        {
            hide = true;
        }
        else
        {
            hide = false;
        }
        if (gameObject.tag == "Text")
        {
            GetComponent <GUIText>().text = "Days Left: " + daysLeft;
            if (hide)
            {
                GetComponent <GUIText>().text = "";
            }
        }
        if ((ll.Equals("Home") || ll.Equals("Town") || ll.Equals("Office")) && daysLeft <= 0 && (!lose || !LevelTrack.indexToString(Application.loadedLevel).Equals("EndGame")))
        {
            lose = true;
            GameObject.FindGameObjectWithTag("Fader").GetComponent <ScreenFader>().fade("EndGame");
        }
    }
コード例 #2
0
    private void Update()
    {
        //GetComponent<Camera>().orthographicSize = Screen.height/100f/4f;
        var ll = LevelTrack.indexToString(Application.loadedLevel);

        transform.position = Vector3.Lerp(transform.position, player.transform.position + new Vector3(0, 20, 0), 1f);
        if (ll.Equals("Forest3D"))
        {
            if (transform.position.x < -12.7f)
            {
                transform.position = new Vector3(-12.7f, transform.position.y, transform.position.z);
            }
            if (transform.position.x > 13.9f)
            {
                transform.position = new Vector3(13.9f, transform.position.y, transform.position.z);
            }
            if (transform.position.z > 9.8f)
            {
                transform.position = new Vector3(transform.position.x, transform.position.y, 9.8f);
            }
            if (transform.position.z < -10.1f)
            {
                transform.position = new Vector3(transform.position.x, transform.position.y, -10.1f);
            }
        }
    }
コード例 #3
0
ファイル: Player.cs プロジェクト: tunderix/LittleFishers
 void Awake()
 {
     experienceTrack = GameObject.Find("ExperienceTrack").GetComponent <ExperienceTrack>();
     levelTracker    = GameObject.Find("LevelIndicator").GetComponent <LevelTrack>();
     playerStats     = new PlayerStats(defaultPlayerExperience, defaultPlayerStrength);
     gameLogic       = (GameLogic)GameObject.FindGameObjectWithTag("KrakenTheGod").GetComponent <GameLogic>();
 }
コード例 #4
0
 private void Start()
 {
     rb = GetComponent <Rigidbody>();
     if (!LevelTrack.indexToString(LevelTrack.prevLevel).Equals("Phone"))
     {
         transform.position = new Vector3(-30, 0, -1.6f);
     }
 }
コード例 #5
0
ファイル: BackButton.cs プロジェクト: owenl131/rpg-quest
 // Update is called once per frame
 private void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         if (r.Contains(Camera.main.ScreenToWorldPoint(Input.mousePosition)))
         {
             var ll = LevelTrack.indexToString(Application.loadedLevel);
             if (ll.Equals("Instructions_1") || ll.Equals("Credits"))
             {
                 Application.LoadLevel(LevelTrack.prevLevel);
             }
             else if (ll.Equals("Instructions_2"))
             {
                 Application.LoadLevel("Instructions_1");
             }
             else if (ll.Equals("Instructions_3"))
             {
                 Application.LoadLevel("Instructions_2");
             }
             else if (ll.Equals("Instructions_4"))
             {
                 Application.LoadLevel("Instructions_3");
             }
             else if (ll.Equals("Instructions_5"))
             {
                 Application.LoadLevel("Instructions_4");
             }
             else if (ll.Equals("Instructions_6"))
             {
                 Application.LoadLevel("Instructions_5");
             }
             else if (ll.Equals("Instructions_7"))
             {
                 Application.LoadLevel("Instructions_6");
             }
             else if (ll.Equals("Instructions_8"))
             {
                 Application.LoadLevel("Instructions_7");
             }
         }
     }
     if (!isOver && r.Contains(Camera.main.ScreenToWorldPoint(Input.mousePosition)))
     {
         isOver = true;
         transform.localScale += new Vector3(0.1f, 0.1f, 0);
     }
     if (isOver && !r.Contains(Camera.main.ScreenToWorldPoint(Input.mousePosition)))
     {
         isOver = false;
         transform.localScale -= new Vector3(0.1f, 0.1f, 0);
     }
 }
コード例 #6
0
ファイル: LevelParent.cs プロジェクト: 8ude/DrummingGame
    public void RotateLeft()
    {
        //StartCoroutine(RotateLevelLeft(Clock.Instance.SixteenthLength()));
        //transform.DOLocalRotate(new Vector3(transform.rotation.x, transform.rotation.y, currentRotation - rotationAngle), Clock.Instance.SixteenthLength());
        //currentRotation -= rotationAngle;

        activeTrackIndex--;
        if (activeTrackIndex < 0)
        {
            activeTrackIndex = numTracks - 1;
        }
        activeTrack = tracks[activeTrackIndex].GetComponent <LevelTrack>();
    }
コード例 #7
0
ファイル: LevelParent.cs プロジェクト: 8ude/DrummingGame
    public void RotateRight()
    {
        //StartCoroutine(RotateLevelRight(Clock.Instance.SixteenthLength()));
        //transform.DOLocalRotate(new Vector3(transform.rotation.x, transform.rotation.y, currentRotation + rotationAngle), Clock.Instance.SixteenthLength());
        //currentRotation += rotationAngle;
        activeTrackIndex++;
        if (activeTrackIndex >= numTracks)
        {
            activeTrackIndex = activeTrackIndex % numTracks;
        }
        activeTrack = tracks[activeTrackIndex].GetComponent <LevelTrack>();

        Debug.Log(activeTrackIndex);
    }
コード例 #8
0
 public void show()
 {
     if (hidden)
     {
         if (LevelTrack.indexToString(Application.loadedLevel).Equals("Quest7BossBattle"))
         {
             pos = new Vector2(550, 100);
         }
         else
         {
             pos = new Vector2(300, 20);
         }
         hidden = false;
     }
 }
コード例 #9
0
ファイル: ScreenFader.cs プロジェクト: owenl131/rpg-quest
    public void fade(int level)
    {
        var s = LevelTrack.indexToString(Application.loadedLevel);

        if (!s.Equals("4D") && !s.Equals("Instructions_1") &&
            !s.Equals("Instructions_2") && !s.Equals("Instructions_3") &&
            !s.Equals("Instructions_4") && !s.Equals("Instructions_5") &&
            !s.Equals("Instructions_6") && !s.Equals("Instructions_7") &&
            !s.Equals("Instructions_8"))
        {
            LevelTrack.prevLevel = Application.loadedLevel;
        }
        Debug.Log("Overloaded fade called " + s);
        curr      = 1;
        nextLevel = LevelTrack.indexToString(level);
        fadeToBlack();
    }
コード例 #10
0
ファイル: PhoneIcon.cs プロジェクト: owenl131/rpg-quest
    // Update is called once per frame
    private void Update()
    {
        var ll = LevelTrack.indexToString(Application.loadedLevel);

        if (ll.Equals("StartPage") || ll.Equals("Menu") || ll.Equals("Credits") || ll.Equals("Introduction") ||
            ll.Equals("Instructions_1") || ll.Equals("Instructions_2") || ll.Equals("Instructions_3") ||
            ll.Equals("Instructions_4") || ll.Equals("Instructions_5") || ll.Equals("4D") ||
            ll.Equals("CounsellingCentre") || ll.Equals("Sleep") ||
            ll.Equals("EndGame") || ll.Equals("Computer") || ll.Equals("Phone") || ll.Equals("Quest5") ||
            ll.Equals("FailQuest") || ll.Equals("ExitQuest") || ll.Equals("HomeTV") || ll.Equals("CompleteQuest") ||
            ll.Equals("Quest10") || ll.Equals("Quest7BossBattle") ||
            ll.Equals("Instructions_6") || ll.Equals("Instructions_7") || ll.Equals("Instructions_8") ||
            ll.Equals("slotmachine"))
        {
            gt.enabled = false;
        }
        else
        {
            gt.enabled = true;
        }
        if (gt.enabled && r.Contains(Input.mousePosition))
        {
            gt.texture = mouseOver;
            if (Input.GetMouseButtonDown(0))
            {
                //prevLoc = GameObject.FindGameObjectWithTag("Player").transform.position;
                //Debug.Log(prevLoc.ToString("G4"));
                prevName.Clear();
                prevPos.Clear();
                var g = FindObjectsOfType <GameObject>();
                for (var i = 0; i < g.Length; i++)
                {
                    prevName.Add(g[i].gameObject.name);
                    prevPos.Add(g[i].transform.position);
                }
                prevLevel = Application.loadedLevel;
                GameObject.FindGameObjectWithTag("Fader").GetComponent <ScreenFader>().fade("Phone");
            }
        }
        else if (gt.enabled)
        {
            gt.texture = normal;
        }
    }
コード例 #11
0
ファイル: LevelParent.cs プロジェクト: 8ude/DrummingGame
    void Start()
    {
        numTracks       = SongManager.instance.CurrentSong.tracks.Length;
        tracks          = new GameObject[numTracks];
        rotationAngle   = 360f / numTracks;
        currentRotation = 0f;

        for (int i = 0; i < numTracks; i++)
        {
            float   xPos    = cylinderRadius * Mathf.Sin(2 * Mathf.PI * i / numTracks);
            float   yPos    = cylinderRadius * Mathf.Cos(2 * Mathf.PI * i / numTracks);
            Vector3 origPos = new Vector3(xPos, yPos, 0);


            GameObject newTrack = Instantiate(trackPlanePrefab, Vector3.zero, Quaternion.identity);

            //Fill track with notes, assign those notes to game objects
            newTrack.GetComponent <LevelTrack>().trackIndex = i;
            newTrack.GetComponent <LevelTrack>().PropogateTrack(SongManager.instance.CurrentSong.tracks[i], sComputer);


            newTrack.transform.Rotate(-Vector3.forward * 360f * i / numTracks);
            newTrack.transform.position = origPos;


            tracks[i] = newTrack;
            newTrack.transform.SetParent(transform);
        }

        activeTrack = tracks[0].GetComponent <LevelTrack>();

        gameOver   = false;
        levelScale = SongManager.instance.levelScale;

        nextMoveTime = AudioSettings.dspTime + Clock.Instance.StartDelay + 0.25f;
        prevMoveTime = nextMoveTime;

        transform.position = new Vector3(0f, -1f * cylinderRadius, 0f);

        endZPosition = -(SongManager.instance.BeatOfLastNote - SongManager.instance.levelOffset) * levelScale;
    }
コード例 #12
0
ファイル: ScreenFader.cs プロジェクト: owenl131/rpg-quest
    public void fade(string level)
    {
        if (isFading)
        {
            return;
        }
        var s = LevelTrack.indexToString(Application.loadedLevel);

        if (!s.Equals("4D") && !s.Equals("Instructions_1") &&
            !s.Equals("Instructions_2") && !s.Equals("Instructions_3") &&
            !s.Equals("Instructions_4") && !s.Equals("Instructions_5") &&
            !s.Equals("Instructions_6") && !s.Equals("Instructions_7") &&
            !s.Equals("Instructions_8"))
        {
            LevelTrack.prevLevel = Application.loadedLevel;
        }
        Debug.Log("Fade called " + level);
        curr      = 1;
        nextLevel = level;
        isFading  = true;
        fadeToBlack();
    }
コード例 #13
0
    public void set()
    {
        var prev = LevelTrack.indexToString(LevelTrack.prevLevel);

        Debug.Log(prev);
        if (prev.Equals("Town") || prev.Equals("Home") || prev.Equals("Casino") || prev.Equals("Office"))
        {
            rend.sprite = townMap;
        }
        else if (prev.Equals("Forest3D"))
        {
            rend.sprite = forestMap;
        }
        else if (prev.Equals("Dungeon"))
        {
            rend.sprite = dungeonMap;
        }
        else
        {
            rend.sprite = null;
        }
    }
コード例 #14
0
ファイル: MoneyCounter.cs プロジェクト: owenl131/rpg-quest
    private void Update()
    {
        var ll = LevelTrack.indexToString(Application.loadedLevel);

        if (ll.Equals("StartPage") || ll.Equals("Phone") || ll.Equals("HomeTV") || ll.Equals("Credits") ||
            ll.Equals("Instructions_1") || ll.Equals("Instructions_2") || ll.Equals("Instructions_3") ||
            ll.Equals("Instructions_4") || ll.Equals("Instructions_5") || ll.Equals("Computer") ||
            ll.Equals("4D") || ll.Equals("CompleteQuest") || ll.Equals("FailQuest") || ll.Equals("ExitQuest") ||
            ll.Equals("EndGame") || ll.Equals("Phone") || ll.Equals("HomeTV") || ll.Equals("Menu") ||
            ll.Equals("Instructions_6") || ll.Equals("Instructions_7") || ll.Equals("Instructions_8"))
        {
            hide = true;
        }
        else
        {
            hide = false;
        }
        if (gameObject.tag == "Text")
        {
            GetComponent <GUIText>().text = "Money: $" + amt + "\nDebt: $" + GameProperties.debt;
            if (hide)
            {
                GetComponent <GUIText>().text = "";
            }
        }
        if ((ll.Equals("Home") || ll.Equals("Town") || ll.Equals("Office")) && amt + TextBoxBank.getBalance() > GameProperties.debt && (!win || !Application.loadedLevelName.Equals("EndGame")))
        {
            Debug.Log("win by money");
            win = true;
            GameObject.FindGameObjectWithTag("Fader").GetComponent <ScreenFader>().fade("EndGame");
        }
        else if (amt < 0)
        {
            GameProperties.debt -= amt;
            amt = 0;
        }
    }
コード例 #15
0
ファイル: CameraFollow.cs プロジェクト: owenl131/rpg-quest
    // Update is called once per frame
    private void Update()
    {
        transform.position = Vector3.Lerp(transform.position, player.transform.position - new Vector3(0, 0, 10), 1f);
        var ll = LevelTrack.indexToString(Application.loadedLevel);

        if (ll.Equals("Town"))
        {
            if (transform.position.x < -3.3)
            {
                transform.position = new Vector3(-3.3f, transform.position.y, -10);
            }
            if (transform.position.x > 4)
            {
                transform.position = new Vector3(4f, transform.position.y, -10);
            }
            if (transform.position.y < -3)
            {
                transform.position = new Vector3(transform.position.x, -3, -10);
            }
            if (transform.position.y > 2.4f)
            {
                transform.position = new Vector3(transform.position.x, 2.4f, -10);
            }
        }
        if (ll.Equals("Office"))
        {
            transform.position = new Vector3(transform.position.x, 0, -10);
            if (transform.position.x < -0.45f)
            {
                transform.position = new Vector3(-0.45f, transform.position.y, -10);
            }
            if (transform.position.x > 0.45f)
            {
                transform.position = new Vector3(0.45f, transform.position.y, -10);
            }
        }
        if (ll.Equals("Casino"))
        {
            if (transform.position.x < 0.3f)
            {
                transform.position = new Vector3(0.3f, transform.position.y, -10);
            }
            if (transform.position.x > 2.1f)
            {
                transform.position = new Vector3(2.1f, transform.position.y, -10);
            }
            if (transform.position.y < -1.2f)
            {
                transform.position = new Vector3(transform.position.x, -1.2f, -10);
            }
            if (transform.position.y > 1.9f)
            {
                transform.position = new Vector3(transform.position.x, 1.9f, -10);
            }
        }
        if (ll.Equals("Home"))
        {
            if (transform.position.x < -0.95f)
            {
                transform.position = new Vector3(-0.95f, transform.position.y, -10);
            }
            if (transform.position.x > 0.95f)
            {
                transform.position = new Vector3(0.95f, transform.position.y, -10);
            }
            if (transform.position.y < -0.4)
            {
                transform.position = new Vector3(transform.position.x, -0.4f, -10);
            }
            if (transform.position.y > 0.36)
            {
                transform.position = new Vector3(transform.position.x, 0.36f, -10);
            }
        }
        if (ll.Equals("CounsellingCentre"))
        {
            transform.position = new Vector3(transform.position.x, -1.92f, -10);
            if (transform.position.x < 2.85f)
            {
                transform.position = new Vector3(2.85f, transform.position.y, -10);
            }
            if (transform.position.x > 3.85f)
            {
                transform.position = new Vector3(3.85f, transform.position.y, -10);
            }
        }
        if (ll.Equals("Bank"))
        {
            if (transform.position.y < -0.35f)
            {
                transform.position = new Vector3(transform.position.x, -0.35f, -10);
            }
            if (transform.position.y > 0.4f)
            {
                transform.position = new Vector3(transform.position.x, 0.4f, -10);
            }
            if (transform.position.x < -0.7f)
            {
                transform.position = new Vector3(-0.7f, transform.position.y, -10);
            }
            if (transform.position.x > 0.22f)
            {
                transform.position = new Vector3(0.22f, transform.position.y, -10);
            }
        }
    }
コード例 #16
0
    private void Start()
    {
        var ll     = LevelTrack.indexToString(Application.loadedLevel);
        var prev   = LevelTrack.indexToString(LevelTrack.prevLevel);
        var player = GameObject.FindWithTag("Player");

        if (ll.Equals("StartPage"))
        {
            Debug.Log("Menu");
            Application.LoadLevel("Menu");
            Debug.Log("Loaded menu");
        }
        if (ll.Equals("Computer"))
        {
            Debug.Log("computer");
            GameObject.Find("Computer").GetComponent <ComputerData>().showScreen();
        }
        if (player == null)
        {
            return;
        }
        if (ll.Equals("Town"))
        {
            if (prev.Equals("Casino"))
            {
                player.transform.position = new Vector3(3.94f, 1.08f, 0f);
            }
            else if (prev.Equals("Home"))
            {
                player.transform.position = new Vector3(-3.58f, 0.58f, 0f);
            }
            else if (prev.Equals("Office"))
            {
                player.transform.position = new Vector3(4.57f, -3.85f, 0f);
            }
            else if (prev.Equals("Bank"))
            {
                player.transform.position = new Vector3(-1.82f, -2.95f, 0f);
            }
        }
        else if (ll.Equals("Home"))
        {
            if (prev.Equals("Town"))
            {
                player.transform.position = new Vector3(0.28f, -1.84f, 0f);
            }
            else if (prev.Equals("HomeTV"))
            {
                player.transform.position = new Vector3(-1.56f, -1.15f, 0);
            }
            else if (prev.Equals("Sleep"))
            {
                player.transform.position = new Vector3(0.22f, 1.76f, 0);
            }
        }
        else if (ll.Equals("Office"))
        {
            //next level is Office
            if (prev.Equals("Computer"))
            {
                player.transform.position = new Vector3(0.745f, 0.95f, 0);
            }
            if (prev.Equals("CounsellingCentre"))
            {
                player.transform.position = new Vector3(-2.6f, 0.8f, 0);
            }
        }
        else if (ll.Equals("Forest3D") || ll.Equals("Dungeon"))
        {
            if (!prev.Equals("Phone"))
            {
                GameObject.Find("HealthBar").GetComponent <HealthBar>().show();
                GameObject.Find("HealthBar").GetComponent <HealthBar>().reset();
            }
        }
        else if (ll.Equals("Quest7BossBattle"))
        {
            GameObject.Find("HealthBar").GetComponent <HealthBar>().show();
            GameObject.Find("HealthBar").GetComponent <HealthBar>().reset(10);
        }
        else if (ll.Equals("Casino"))
        {
            if (prev.Equals("slotmachine"))
            {
                GameObject.FindWithTag("Player").transform.position = SlotMachineColliders.prevPos;
            }
        }
        if (prev.Equals("Phone"))
        {
            var pi   = GameObject.Find("Phone").GetComponent <PhoneIcon>();
            var name = pi.getPrevName();
            var pos  = pi.getPrevPos();
            var g    = FindObjectsOfType <GameObject>();
            for (var i = 0; i < g.Length; i++)
            {
                for (var j = 0; j < name.Count; j++)
                {
                    if (g[i].gameObject.name.Equals(name[j]))
                    {
                        g[i].transform.position = pos[j];
                    }
                }
            }
            Debug.Log(player.transform.position.ToString("G4"));
        }
    }
コード例 #17
0
ファイル: PhoneIconX.cs プロジェクト: owenl131/rpg-quest
    // Update is called once per frame
    private void Update()
    {
        //Physics.IgnoreCollision(GetComponent<Collider>(), GameObject.FindWithTag("Player").GetComponent<Collider>());
        //var size = GetComponent<Renderer>().bounds.size;
        //var position = transform.position;

        var ll = LevelTrack.indexToString(Application.loadedLevel);

        if (ll.Equals("StartPage") || ll.Equals("Menu") || ll.Equals("Credits") || ll.Equals("Introduction") ||
            ll.Equals("Instructions_1") || ll.Equals("Instructions_2") || ll.Equals("Instructions_3") ||
            ll.Equals("Instructions_4") || ll.Equals("Instructions_5") || ll.Equals("4D") ||
            ll.Equals("CounsellingCentre") || ll.Equals("Sleep") ||
            ll.Equals("EndGame") || ll.Equals("Computer") || ll.Equals("Phone") || ll.Equals("Quest5") ||
            ll.Equals("FailQuest") || ll.Equals("ExitQuest") || ll.Equals("HomeTV") || ll.Equals("CompleteQuest"))
        {
            GetComponent <SpriteRenderer>().enabled = false;
        }
        else
        {
            GetComponent <SpriteRenderer>().enabled = true;
        }
        if (Camera.main != null)
        {
            if (ll.Equals("Forest3D") || ll.Equals("Dungeon") || ll.Equals("Quest7BossBattle"))
            {
                transform.eulerAngles = new Vector3(90, 0, 0);
                verticalSize          = Camera.main.orthographicSize * 2.0f;
                horizontalSize        = verticalSize * Screen.width / Screen.height;
                transform.position    = Vector3.Lerp(transform.position,
                                                     new Vector3((0.93f * horizontalSize) - horizontalSize / 2 + Camera.main.transform.position.x, 0,
                                                                 (0.39f * verticalSize) - verticalSize / 2 + Camera.main.transform.position.z), 0.1f);
                //r = new Rect(position.x - size.x/2, position.z - size.y/2, size.x, size.y);
            }
            else
            {
                transform.eulerAngles = new Vector3(0, 0, 0);
                verticalSize          = Camera.main.orthographicSize * 2.0f;
                horizontalSize        = verticalSize * Screen.width / Screen.height;
                transform.position    = Vector3.Lerp(transform.position,
                                                     new Vector3((0.93f * horizontalSize) - horizontalSize / 2 + Camera.main.transform.position.x,
                                                                 (0.39f * verticalSize) - verticalSize / 2 + Camera.main.transform.position.y, 0), 0.1f);
                //r = new Rect(position.x - size.x / 2, position.y - size.y / 2, size.x, size.y);
            }

            /*if (Input.GetMouseButtonDown(0) && GetComponent<SpriteRenderer>().enabled)
             * {
             *  if (r.Contains(Camera.main.ScreenToWorldPoint(Input.mousePosition)))
             *  {
             *      prevLoc = GameObject.FindGameObjectWithTag("Player").transform.position;
             *
             *      Debug.Log(prevLoc.ToString("G4"));
             *      prevLevel = Application.loadedLevel;
             *      GameObject.FindGameObjectWithTag("Fader").GetComponent<ScreenFader>().fade("Phone");
             *  }
             * }
             * if (!isOver && r.Contains(Camera.main.ScreenToWorldPoint(Input.mousePosition)))
             * {
             *  isOver = true;
             *  sr.sprite = mouseOver;
             * }
             * if (isOver && !r.Contains(Camera.main.ScreenToWorldPoint(Input.mousePosition)))
             * {
             *  isOver = false;
             *  sr.sprite = normal;
             * }*/
        }
    }
コード例 #18
0
 // Update is called once per frame
 private void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         if (r.Contains(Camera.main.ScreenToWorldPoint(Input.mousePosition)))
         {
             var s = LevelTrack.indexToString(Application.loadedLevel);
             if (s.Equals("Instructions_1"))
             {
                 Application.LoadLevel("Instructions_2");
             }
             else if (s.Equals("Instructions_2"))
             {
                 Application.LoadLevel("Instructions_3");
             }
             else if (s.Equals("Instructions_3"))
             {
                 Application.LoadLevel("Instructions_4");
             }
             else if (s.Equals("Instructions_4"))
             {
                 Application.LoadLevel("Instructions_5");
             }
             else if (s.Equals("Instructions_5"))
             {
                 Application.LoadLevel("Instructions_6");
             }
             else if (s.Equals("Instructions_6"))
             {
                 Application.LoadLevel("Instructions_7");
             }
             else if (s.Equals("Instructions_7"))
             {
                 Application.LoadLevel("Instructions_8");
             }
             else if (s.Equals("Instructions_8"))
             {
                 GameObject.Find("ScreenFader").GetComponent <ScreenFader>().fade(LevelTrack.prevLevel);
             }
             else if (s.Equals("EndGame"))
             {
                 GameObject.Find("WinningNumber").GetComponent <WinningNumber>().reset();
                 GameObject.Find("Computer").GetComponent <QuestManager>().reset();
                 MoneyCounter.reset();
                 DayCounter.reset();
                 TextBoxBank.reset();
                 GameObject.FindGameObjectWithTag("Fader").GetComponent <ScreenFader>().fade("Menu");
             }
         }
     }
     if (!isOver && r.Contains(Camera.main.ScreenToWorldPoint(Input.mousePosition)))
     {
         isOver = true;
         transform.localScale += new Vector3(0.1f, 0.1f, 0);
     }
     if (isOver && !r.Contains(Camera.main.ScreenToWorldPoint(Input.mousePosition)))
     {
         isOver = false;
         transform.localScale -= new Vector3(0.1f, 0.1f, 0);
     }
 }