// Use this for initialization
    void Start()
    {
        Red.SetActive(false);
        Blue.SetActive(false);
        Danger.SetActive(false);
        Warning.SetActive(false);
        ArrowL.SetActive(false);
        ArrowR.SetActive(false);
        Speeder.SetActive(false);

        red     = false;
        blue    = false;
        danger  = false;
        warning = false;
        arrowR  = false;
        arrowL  = false;
        speeder = false;

        slipR       = false;
        slipL       = false;
        nextTunnel  = false;
        tunnel      = false;
        way         = false;
        RoL         = false;
        RoR         = false;
        rotate      = 0;
        speed       = 2f;
        roteteSpeed = 10f;
        totateSpeed = 10f;
        check       = 0;
        checkTunnel = 0;
        checkRoY    = 0;
        timeCre     = 0;
        sp          = 10;
        maxSp       = 200;
        anim        = GetComponent <Animator>();
        source1     = GetComponent <AudioSource>();
        rb          = GetComponent <Rigidbody>();
    }
    public void Detecter()
    {
        if (red == true)
        {
            Red.SetActive(true);
            //camShake.cameraShake();
            StartCoroutine(close());
        }

        if (blue == true)
        {
            Blue.SetActive(true);
            //camShake.cameraShake();
            StartCoroutine(close());
        }

        if (danger == true)
        {
            Danger.SetActive(true);
            StartCoroutine(close());
        }

        if (warning == true)
        {
            Warning.SetActive(true);
            StartCoroutine(close());
        }

        if (arrowL == true)
        {
            ArrowL.SetActive(true);
            StartCoroutine(close());
        }

        if (arrowR == true)
        {
            ArrowR.SetActive(true);
            StartCoroutine(close());
        }

        if (speeder == true)
        {
            Speeder.SetActive(true);
            StartCoroutine(close());
        }



        if (red == false)
        {
            Red.SetActive(false);
        }

        if (blue == false)
        {
            Blue.SetActive(false);
        }

        if (danger == false)
        {
            Danger.SetActive(false);
        }

        if (warning == false)
        {
            Warning.SetActive(false);
        }

        if (arrowL == false)
        {
            ArrowL.SetActive(false);
        }

        if (arrowR == false)
        {
            ArrowR.SetActive(false);
        }
        if (speeder == false)
        {
            Speeder.SetActive(false);
        }
    }