Esempio n. 1
0
    /*
     *  Each storyboard function called moment:
     * CreateScene     => after finish load scene before play enter animation(only call after load from prefab or asset bundle, read cache from MgrScene will not called).
     * WillEnterScene => after CreatScene, at the begin of play enter animation.
     * EnterScene     => at the end of play enter animation.
     *
     * WillExitScene  => at the begin of play exit animation.
     * ExitScene      => at the end of play exit animation.
     * DestroyScene   => when destroy the scene(before destroy).
     *
     * OverlayBegan   => when scene overlaid(only XLAF popup).
     * OverlayEnded   => when scene overlaid object disappear(only XLAF popup).
     * AndroidGoBack  => in Android, user press back button.
     * UpdateLanguage => when update language or after CreatScene.
     */
    public override void CreateScene(object obj)
    {
        BindAllButtonsClickEvent();
        Log.Debug("scene1 creat_scene", obj);

//		string fn = ModUtils.documentsDirectory + "/test.jsn";
//		string def = ModUtils.streamingDirectory + "/test.jsn";
//		MgrData.AddSetting ("test", fn, def);
        MgrAudio.PlayMusic("m_start.mp3", 0.5f);
        ModDispatcher.AddListener("dia2", (XLAF_Event e) => {
            Log.Debug("dia2:", e.ToString());
        });

        MgrBackdoor.SetBackdoor(ModUIUtils.GetChild(transform, "lbl_text"), (isHandled, cmd) => {
            Log.Debug(isHandled, cmd);
        });


//		Transform txt = ModUIUtils.GetChild (transform, "lbl_text");
//		ModUIUtils.AddTouchEvent (txt.gameObject, e => {
//			Log.Debug (e);
//			if(e.phase==Phase.Up){
//				ModUIUtils.RemoveTouchEvent(e.target);
//			}
//		});
    }
Esempio n. 2
0
    private void btn_click()
    {
        MgrAudio.PlaySound("s_click.mp3");

        MgrPopup.Hide("Popup1", SceneAnimation.fade, 1f, null);
//        MgrPopup.Show ("Popup2", "55892", SceneAnimation.fade, 1f, () => {
//            Log.Debug ("Popup1 Done~");
//        });
    }
Esempio n. 3
0
    private void btn_click()
    {
        MgrAudio.PlaySound("s_click.mp3");
//        foreach (string s in MgrScene.GetAllScenes().Keys) {
//            Log.Debug (s);
//        }
//        MgrPopup.Hide ("Popup1", SceneAnimation.fade, null);
        MgrPopup.HideTop();
//        MgrPopup.Show ("Popup1", "55892", SceneAnimation.fade, 1f, () => {
//            Log.Debug ("Popup1 Done~");
//        });
    }
Esempio n. 4
0
 private void InitMgr()
 {
     m_MgrData     = transform.Find("MgrData").GetComponent <MgrData> ();
     m_MgrTool     = CreateMgr <MgrTool> (gameObject);
     m_MgrResource = CreateMgr <MgrResource> (gameObject);
     m_MgrBundle   = CreateMgr <MgrBundle> (gameObject);
     m_MgrAudio    = CreateMgr <MgrAudio> (gameObject);
     m_MgrPrefab   = CreateMgr <MgrPrefab> (gameObject);
     m_MgrLevel    = CreateMgr <MgrLevel> (gameObject);
     m_MgrPost     = CreateMgr <MgrPost> (gameObject);
     m_MgrDownload = CreateMgr <MgrDownload>(gameObject);
 }
Esempio n. 5
0
 private void btn_click()
 {
     MgrAudio.PlaySound("s_click.mp3");
     MgrScene.GotoScene("Scene1", 998855, Main.anim, 1f, cb);
 }