Exemple #1
0
    void Start( )
    {
        uiHandler        = ui.GetComponent <UIHandler>( );
        titleMenuHandler = titleMenu.GetComponent <TitleMenuHandler>( );

        if (askSaveDialogResource == null)
        {
            askSaveDialogResource = Resources.Load("Ask Save Dialog Panel", typeof(GameObject));
        }

        if (fileDialogResource == null)
        {
            fileDialogResource = Resources.Load("File Dialog Panel", typeof(GameObject));
        }

        if (saveFailedDialogResource == null)
        {
            saveFailedDialogResource = Resources.Load("Save Failed Dialog Panel", typeof(GameObject));
        }

        if (invalidFilenameDialogResource == null)
        {
            invalidFilenameDialogResource = Resources.Load("Invalid Filename Dialog Panel", typeof(GameObject));
        }

        if (invalidDrawClaimDialogResource == null)
        {
            invalidDrawClaimDialogResource = Resources.Load("Invalid Draw Claim Dialog Panel", typeof(GameObject));
        }
    }
 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 // protected
 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 /**
  * �˵���Ӻ���
  */
 protected void addMenu(string name, TitleMenuHandler handler)
 {
     m_nMenuPos++;
     if (name == null)
     {
         SystemMenuApi.InsertMenu(m_obMenuHand, m_nMenuPos, SystemMenuApi.MF_SEPARATOR, 0, "");
     }
     else
     {
         SystemMenuApi.InsertMenu(m_obMenuHand, m_nMenuPos, SystemMenuApi.MF_STRING, m_nMenuId, name);
         m_nMenuId++;
         m_arrCallBack.Add(handler);
     }
 }
    void Start( )
    {
        uiHandler = ui.GetComponent<UIHandler>( );
        titleMenuHandler = titleMenu.GetComponent<TitleMenuHandler>( );

        if( askSaveDialogResource == null ) {
            askSaveDialogResource = Resources.Load( "Ask Save Dialog Panel", typeof( GameObject ) );
        }

        if( fileDialogResource == null ) {
            fileDialogResource = Resources.Load( "File Dialog Panel", typeof( GameObject ) );
        }

        if( saveFailedDialogResource == null ) {
            saveFailedDialogResource = Resources.Load( "Save Failed Dialog Panel", typeof( GameObject ) );
        }

        if( invalidFilenameDialogResource == null ) {
            invalidFilenameDialogResource = Resources.Load( "Invalid Filename Dialog Panel", typeof( GameObject ) );
        }

        if( invalidDrawClaimDialogResource == null ) {
            invalidDrawClaimDialogResource = Resources.Load( "Invalid Draw Claim Dialog Panel", typeof( GameObject ) );
        }
    }