Esempio n. 1
0
    IEnumerator CreateSceneWhenDestroyed(Scene sceneData)
    {
//		VM vm = VM.Instance;
//		if( vm != null && Application.isPlaying ){
//			vm.EnableUpdate( false );
        if (Application.isPlaying)
        {
            ViNoAPI.EnableUpdateADV(false);
        }

        while (m_DestroyRequested)
        {
            Debug.Log("waiting for Cleaning Up the scene...");
            yield return(new WaitForSeconds(0.01f));
        }
//		Debug.Log( "CreateScene CreateSceneWhenDestroyed");
//		Debug.Log( "_FADEIN_AT_CREATE:" + _FADEIN_AT_CREATE.ToString() );
        Create(sceneData);
//		if( vm != null && Application.isPlaying ){
//			vm.EnableUpdate( true );

        if (Application.isPlaying)
        {
            ViNoAPI.EnableUpdateADV(true);
        }
    }
Esempio n. 2
0
    void OnClickQLoad()
    {
//		Debug.Log( "Click QLoad" );
        if (ViNoAPI.DoQuickLoad())
        {
            // Q Load Succeeded.
        }
//		ToggleActiveMenuPanel();
    }
Esempio n. 3
0
    void OnClickQSave()
    {
//		Debug.Log( "Click QSave" );
        if (ViNoAPI.DoQuickSave())
        {
            // Q Save Succeeded.
            BroadcastMessage("DidQuickSave", SendMessageOptions.DontRequireReceiver);
        }

//		ToggleActiveMenuPanel();
    }
Esempio n. 4
0
    void OnGUI()
    {
        if (GUILayout.Button("Start TileFadeDemo"))
        {
            ViNoAPI.PlayScenario("TileFadeDemo");
        }

        if (GUILayout.Button("Start BlindDemo"))
        {
            ViNoAPI.PlayScenario("BlindDemo");
        }
    }
Esempio n. 5
0
        void jump(Hashtable param)
        {
            string label = param["target"] as string;

            label = label.Replace("*", "");
            if (param.ContainsKey("storage"))
            {
                string storage = param["storage"] as string;
                Debug.Log("Now , Play scenario:" + storage);
                ViNoAPI.PlayScenario(storage);
            }
            Debug.Log("label:" + label);
            VM.Instance.GoToLabel(label);
        }
    void OnGUI()
    {
        if (scenarios != null && scenarios.Length > 0)
        {
//			GUILayout.BeginHorizontal();
            for (int i = 0; i < scenarios.Length; i++)
            {
                if (GUILayout.Button(scenarios[i].name))
                {
                    ViNoAPI.PlayScenario(scenarios[i].name);
                }
            }
//			GUILayout.EndHorizontal();
        }
    }
Esempio n. 7
0
    void OnGUI()
    {
        if (isPlaying)
        {
            return;
        }

        // Instantiate Resources/SachiTalks.prefab
        if (GUI.Button(m_Rect1, "SachiTalks"))
        {
            ViNoAPI.PlayScenario("SachiTalks");
            isPlaying = true;
        }

        // Instantiate Resources/YoshinoTalks.prefab
        if (GUI.Button(m_Rect2, "YoshinoTalks"))
        {
            ViNoAPI.PlayScenario("YoshinoTalks");
            isPlaying = true;
        }
    }
Esempio n. 8
0
    public override void OnGUICustom()
    {
//		m_AreaRect = new Rect( Screen.width - m_AreaWidth ,  0f , m_AreaWidth , Screen.height  );
//		GUILayout.BeginArea( m_AreaRect );

        if (GUILayout.Button("QuickSave", GUILayout.Width(200f), GUILayout.Height(50f)))
        {
            if (ViNoAPI.DoQuickSave())
            {
                Debug.Log("Quick Save succeeded");
            }
        }

        if (GUILayout.Button("QuickLoad", GUILayout.Width(200f), GUILayout.Height(50f)))
        {
            if (ViNoAPI.DoQuickLoad())
            {
                Debug.Log("Quick Load succeeded");
            }
        }

//		GUILayout.EndArea();
    }
Esempio n. 9
0
    public override void OnGUICustom()
    {
        m_AreaRect = new Rect(Screen.width - m_AreaWidth, 0f, m_AreaWidth, Screen.height);
        GUILayout.BeginArea(m_AreaRect);

        if (quickMenuTex != null)
        {
            if (GUILayout.Button(quickMenuTex))
            {
                m_ShowMenu = !m_ShowMenu;
            }
        }
        else
        {
            if (GUILayout.Button("Menu", GUILayout.Height(m_ButtonHeight)))
            {
                m_ShowMenu = !m_ShowMenu;
            }
        }

        GUILayout.Space(m_VerticalSpace);

        if (m_ShowMenu)
        {
// TODO.
#if true
            if (GUILayout.Button("QuickSave", GUILayout.Height(m_ButtonHeight)))
            {
                Debug.Log("Quick Save");
                if (statusLabel != null)
                {
                    statusLabel.text = "Saved !";
                }
                if (ViNoAPI.DoQuickSave())
                {
                    Debug.Log("Quick Save succeeded");
                }
            }

            GUILayout.Space(m_VerticalSpace);

            if (GUILayout.Button("QuickLoad", GUILayout.Height(m_ButtonHeight)))
            {
                Debug.Log("Quick Load");
                if (statusLabel != null)
                {
                    statusLabel.text = "Load !";
                }
                if (ViNoAPI.DoQuickSave())
                {
                    Debug.Log("Quick Load succeeded");
                }
            }
#endif
            GUILayout.Space(m_VerticalSpace);

            if (GUILayout.Button("Back Log", GUILayout.Height(m_ButtonHeight)))
            {
                ViNo.ToggleShowBackLog();

                sampleGUI.EnableShowBackLog(true);
                sampleGUI.EnableShowQuickMenu(false);
                sampleGUI.EnableShowNextMessage(false);

                m_ShowMenu = false;
            }

            GUILayout.Space(m_VerticalSpace);
        }

        GUILayout.EndArea();
    }
Esempio n. 10
0
 public void UnlockForceAutoMode()
 {
     ViNoAPI.UnlockForceAutoMode();
 }
Esempio n. 11
0
 public void ForceAutoMode()
 {
     ViNoAPI.ForceAutoMode();
 }
Esempio n. 12
0
// Platform StandAlone Key Input.
#if UNITY_EDITOR || UNITY_STANDALONE || UNITY_WEBPLAYER
    // Update is called once per frame
    void Update()
    {
        SystemUIEvent sys = SystemUIEvent.Instance;

        if (sys != null)
        {
            ISelectionsCtrl sel = ISelectionsCtrl.Instance;
            if (sel != null && sel.IsActive())
            {
                return;
            }

            // Handle Keyboard.
            if (useKeyboard)
            {
                if (Input.GetKeyDown(KeyCode.Return))
                {
                    if (sys.IsActiveCurrentMessageTarget())
                    {
                        ViNoAPI.NextMessage();
                    }
                }

                if (Input.GetKeyDown(KeyCode.Escape))
                {
                    if (sys.IsActiveBackLog())
                    {
                        ViNoEventManager.Instance.TriggerEvent("ToggleActiveBackLog");
                    }
                    else if (sys.IsActiveConfig())
                    {
                        ViNoEventManager.Instance.TriggerEvent("ToggleActiveConfig");
                    }
                    else if (sys.IsActiveSaveLoadPanel())
                    {
                        ViNoEventManager.Instance.TriggerEvent("ToggleActiveSaveLoadPanel");
                    }
                    else
                    {
                        ViNoEventManager.Instance.TriggerEvent("ToggleActiveMenuPanel");
                    }
                }

                if (Input.GetKeyDown(KeyCode.UpArrow))
                {
                    ViNoEventManager.Instance.TriggerEvent("OnClickBackLog");
                }
                else if (Input.GetKeyDown(KeyCode.DownArrow))
                {
                    if (sys.IsActiveCurrentMessageTarget())
                    {
                        ViNoAPI.NextMessage();
//						ViNoEventManager.Instance.TriggerEvent( "ToggleActiveSaveLoadPanel" );
                    }
                }

                // Menu is Activated.
                bool isActiveMenuPanel = sys.IsActiveMenuPanel();
                if (isActiveMenuPanel)
                {
                    if (Input.GetKeyDown(KeyCode.S))
                    {
                        ViNoEventManager.Instance.TriggerEvent("OnClickSave");
                    }
                    else if (Input.GetKeyDown(KeyCode.L))
                    {
                        ViNoEventManager.Instance.TriggerEvent("OnClickLoad");
                    }
                    else if (Input.GetKeyDown(KeyCode.P))
                    {
                        ViNoEventManager.Instance.TriggerEvent("ToggleActiveConfig");
                    }
                }
                // Normal.
                else
                {
                    if (Input.GetKeyDown(KeyCode.S))
                    {
                        ViNoEventManager.Instance.TriggerEvent("ShowSavePanel");
                    }
                    else if (Input.GetKeyDown(KeyCode.L))
                    {
//						ViNoEventManager.Instance.TriggerEvent( "OnClickLoad" );
                        ViNoEventManager.Instance.TriggerEvent("ShowLoadPanel");
                    }
                    else if (Input.GetKeyDown(KeyCode.A))
                    {
                        ViNoEventManager.Instance.TriggerEvent("OnClickAuto");
                    }

/*					else if( Input.GetKeyDown( KeyCode.S ) ){
 *                                              ViNoEventManager.Instance.TriggerEvent( "OnClickSkip" );
 *                                      }
 *                                      else if( Input.GetKeyDown( KeyCode.L ) ){
 *                                              ViNoEventManager.Instance.TriggerEvent( "ToggleActiveBackLog" );
 *                                      }
 * //*/
                }

                if (Input.GetKeyDown(KeyCode.Space) ||
                    Input.GetKeyDown(KeyCode.RightArrow) || Input.GetKeyDown(KeyCode.LeftArrow))
                {
                    bool t = sys.IsActiveSystemUI( );
                    sys.ShowSystemUI(!t);
                }
            }

            // Handle Mouse Wheel.
            if (useMouseWheelScroll)
            {
                float scroll = Input.GetAxis("Mouse ScrollWheel");

                bool isActiveSystem = sys.IsActiveSystemUI( );

                // Wheel Up and show BackLog.
                if (isActiveSystem && scroll > 0)
                {
                    ViNoEventManager.Instance.TriggerEvent("OnClickBackLog");
                }
                // Wheel Down and Next Message.
                else if (scroll < 0)
                {
                    if (isActiveSystem && sys.IsActiveCurrentMessageTarget())
                    {
                        ViNoAPI.NextMessage();
                    }
                }
            }
        }
    }
Esempio n. 13
0
        void OnPlayScenario(Hashtable param)
        {
            string scenarioName = param["name"] as string;

            ViNoAPI.PlayScenario(scenarioName);
        }
Esempio n. 14
0
 void OnClickQuickContinue()
 {
     ViNoAPI.DoQuickLoad();
 }
Esempio n. 15
0
 void OnClickNewGame()
 {
     ViNoAPI.DoNewGame();
 }