public static void ChangeAllUIColor(float percentage, List <UISprite> exclude)
    {
        var sprites = GameObject.FindObjectsOfType(typeof(UISprite));

        foreach (var sp in sprites)
        {
            UISprite sprite = (UISprite)sp;
            if (exclude == null || !exclude.Contains(sprite))
            {
                NewbieCommonHelper.ChangeUIColor(sprite, percentage);
            }
        }
    }
 private void ResetHighlight()
 {
     foreach (UISprite sprite in this.m_HighlightUI)
     {
         NewbieCommonHelper.ChangeUIColor(sprite, 1 / this.m_MaskColorPercentage);
     }
     this.m_HighlightUI.Clear();
     foreach (tk2dBaseSprite sprite in this.m_HighlightSprites)
     {
         NewbieCommonHelper.ChangeSpriteColor(sprite, 1 / this.m_MaskColorPercentage);
     }
     this.m_HighlightSprites.Clear();
     foreach (UILabel label in this.m_HighlightLabel)
     {
         NewbieCommonHelper.ChangeLabelColor(label, 1 / this.m_MaskColorPercentage);
     }
     this.m_HighlightLabel.Clear();
 }
    IEnumerator Guide()
    {
        GameObject dialog = GameObject.Instantiate(this.m_TipsDialogPrefab) as GameObject;

        dialog.transform.GetChild(0).gameObject.SetActive(true);
        Collider collider = dialog.GetComponentInChildren <Collider>();

        GameObject.Destroy(collider);
        dialog.transform.position = GameObject.Find(ClientStringConstants.UI_ROOT_OBJECT_NAME).transform.position;
        this.m_CurrentTipsDialog  = dialog.GetComponentInChildren <UIWindowGuide>();
        this.m_CurrentTipsDialog.SetWindowItem(StringConstants.NEWBIEGUIDE_CONTEXT[9.4f]);
        this.m_CurrentTipsDialog.ShowWindow(this.m_StepStartSide, true, this.m_StepStartPosition);

        while (this.m_CurrentGuideStep < 1)
        {
            yield return(null);
        }

        this.m_CurrentTipsDialog.SetWindowItem(StringConstants.NEWBIEGUIDE_CONTEXT[9.41f]);
        this.m_CurrentTipsDialog.ShowWindow(this.m_StepTrophySide, true, this.m_StepTrophyPosition);

        this.m_TrophyArrow = GameObject.Instantiate(this.m_TrophyArrowPrefab) as GameObject;
        this.m_TrophyArrow.transform.position = this.m_TrophyUI[0].transform.position + this.m_TrophyArrowOffset;
        foreach (UISprite sprite in this.m_TrophyUI)
        {
            this.m_HighlightUI.Add(sprite);
            NewbieCommonHelper.ChangeUIColor(sprite, 1 / this.m_MaskColorPercentage);
        }
        foreach (UILabel label in this.m_TrophyLabel)
        {
            this.m_HighlightLabel.Add(label);
            NewbieCommonHelper.ChangeLabelColor(label, 1 / this.m_MaskColorPercentage);
        }

        while (this.m_CurrentGuideStep < 2)
        {
            yield return(null);
        }

        GameObject.Destroy(this.m_TrophyArrow);

        this.m_CurrentTipsDialog.SetWindowItem(StringConstants.NEWBIEGUIDE_CONTEXT[9.5f]);
        this.m_CurrentTipsDialog.ShowWindow(this.m_StepFortressSide, true, this.m_StepFortressPosition);
        BuildingAI building = (BuildingAI)GameObject.FindObjectOfType(typeof(BuildingAI));

        tk2dBaseSprite[] sprites = building.GetComponentsInChildren <tk2dBaseSprite>();
        this.m_InstructArrow = GameObject.Instantiate(this.m_InstructArrowPrefab) as GameObject;
        this.m_InstructArrow.transform.position = building.transform.position + this.m_StepFortressArrowOffset;
        foreach (tk2dBaseSprite sprite in sprites)
        {
            this.m_HighlightSprites.Add(sprite);
            NewbieCommonHelper.ChangeSpriteColor(sprite, 1 / this.m_MaskColorPercentage);
        }

        while (this.m_CurrentGuideStep < 3)
        {
            yield return(null);
        }

        GameObject.Destroy(this.m_InstructArrow);
        this.m_CurrentTipsDialog.HideWindow(true);
        GameObject.Destroy(this.m_CurrentTipsDialog.gameObject);
        NewbieCommonHelper.ChangeAllUIColor(1 / this.m_MaskColorPercentage, this.m_HighlightUI);
        NewbieCommonHelper.ChangeAllSpritesColor(1 / this.m_MaskColorPercentage, this.m_HighlightSprites);
        NewbieCommonHelper.ChangeAllLabelColor(1 / this.m_MaskColorPercentage, this.m_HighlightLabel);

        this.m_HighlightSprites.Clear();
        this.m_HighlightUI.Clear();

        this.GetComponent <Collider>().enabled = false;
        GameObject.Instantiate(this.m_NewbieFinger);
    }