Exemplo n.º 1
0
    //初始化
    protected override void OnDlgInit()
    {
        mCommonUIManager = Singlton.getInstance("NvCommonUIManager") as NvCommonUIManager;

        for (int i = 0; i < SongSel.Length; i++)
        {
            SongSel[i].SetActiveRecursively(false);
            for (int j = 0; j < SongSel[i].transform.childCount; j++)
            {
                GameObject child = SongSel[i].transform.GetChild(j).gameObject;
                if (child.name == "LabName")
                {
                    LabSongName[i] = child.GetComponent(typeof(UILabel)) as UILabel;
                }
                else if (child.name == "LabSinger")
                {
                    LabSinger[i] = child.GetComponent(typeof(UILabel)) as UILabel;
                }
                else if (child.name == "SongListBg")
                {
                    SprSongListBg[i]         = child.GetComponent(typeof(UISprite)) as UISprite;
                    SprSongListBg[i].enabled = false;
                }
            }
        }

        StartCoroutine(_ListedSong());
    }
    private UISprite[] SprSongListBg = new UISprite[20]; //�����б��еı�ѡ��ʱ��ʾ�ı���ͼ

    #endregion Fields

    #region Methods

    //��ʼ��
    protected override void OnDlgInit()
    {
        mCommonUIManager = Singlton.getInstance("NvCommonUIManager") as NvCommonUIManager;

        for (int i = 0; i < SongSel.Length; i++)
        {
            SongSel[i].SetActiveRecursively(false);
            for (int j = 0; j < SongSel[i].transform.childCount; j++)
            {
                GameObject child = SongSel[i].transform.GetChild(j).gameObject;
                if(child.name == "LabName")
                {
                    LabSongName[i] = child.GetComponent(typeof(UILabel)) as UILabel;
                }
                else if(child.name == "LabSinger")
                {
                    LabSinger[i] = child.GetComponent(typeof(UILabel)) as UILabel;
                }
                else if(child.name == "SongListBg")
                {
                    SprSongListBg[i] = child.GetComponent(typeof(UISprite)) as UISprite;
                    SprSongListBg[i].enabled = false;
                }
            }
        }

        StartCoroutine(_ListedSong());
    }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        m_GuiTexture       = iTween.CameraFadeAdd();
        m_GuiTexture.layer = LayerMask.NameToLayer("UILayer");
        DontDestroyOnLoad(m_GuiTexture);
        m_GuiTexture.active = false;

        m_UIMgr = Singlton.getInstance("NvCommonUIManager") as NvCommonUIManager;
        //Debug.Log("Start SceneManager.");
        cShareData = new DcShareData();
    }
//	private bool buildVisibleTableCallback( Transform tr, object args )
//	{
//		NvUIBase elem = tr.GetComponent<NvUIBase>();
//		if ( elem == null )
//		{
//			saveVisibleToTable( tr, tr.gameObject.active );
//		}
//		else
//		{
//			return true;
//		}
//
//		return false;
//	}

//	protected override void AwakeImpl ()
//	{
//		// do nothing in dialog awake
//		enumWidgets(buildVisibleTableCallback);
//	}

    protected override void AwakeImpl()
    {
        m_CommonUIManager = Singlton.getInstance("NvCommonUIManager") as NvCommonUIManager;

        Unlock();

        if (m_CloseButton != null)
        {
            m_CloseButton.eventOnClick += (sender, context) => {
                closeDialog();
            };
        }

        m_State = EState.E_STATE_CLOSED;
    }
Exemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        m_GuiTexture = iTween.CameraFadeAdd ();
        m_GuiTexture.layer = LayerMask.NameToLayer ("UILayer");
        DontDestroyOnLoad (m_GuiTexture);
        m_GuiTexture.active = false;

        m_UIMgr = Singlton.getInstance("NvCommonUIManager") as NvCommonUIManager;
        //Debug.Log("Start SceneManager.");
        cShareData = new DcShareData();
    }
Exemplo n.º 6
0
 void Awake()
 {
     mCommonUIManager = Singlton.getInstance("NvCommonUIManager") as NvCommonUIManager;
 }
Exemplo n.º 7
0
 void Awake()
 {
     mCommonUIManager = Singlton.getInstance("NvCommonUIManager") as NvCommonUIManager;
 }
    //    private bool buildVisibleTableCallback( Transform tr, object args )
    //    {
    //        NvUIBase elem = tr.GetComponent<NvUIBase>();
    //        if ( elem == null )
    //        {
    //            saveVisibleToTable( tr, tr.gameObject.active );
    //        }
    //        else
    //        {
    //            return true;
    //        }
    //        
    //        return false;
    //    }
    //    protected override void AwakeImpl ()
    //    {
    //        // do nothing in dialog awake
    //        enumWidgets(buildVisibleTableCallback);
    //    }
    protected override void AwakeImpl()
    {
        m_CommonUIManager = Singlton.getInstance("NvCommonUIManager") as NvCommonUIManager;

        Unlock();

        if ( m_CloseButton != null )
        {
            m_CloseButton.eventOnClick += (sender, context) => {

                closeDialog();

            };
        }

        m_State = EState.E_STATE_CLOSED;
    }