Esempio n. 1
0
        protected override void Start()
        {
            JCS_UIManager uim = JCS_UIManager.instance;

            uim.SetJCSDialogue(mDialogueType, this);

            base.Start();

            // pause the app
            JCS_ApplicationManager.APP_PAUSE = true;
        }
Esempio n. 2
0
        protected override void Awake()
        {
#if (UNITY_5_4_OR_NEWER)
            this.mRectTransform = this.GetComponent <RectTransform>();
            if (mRectTransform == null)
            {
                return;
            }

            // this is the new way of doing the "OnLevelWasLoaded"
            // function call after version 5.4
            UnityEngine.SceneManagement.SceneManager.sceneLoaded += (scene, loadingMode) =>
            {
                JCS_UIManager uim = JCS_UIManager.instance;

                // Once we load the scene we need to let new object
                // in the scene know about us!
                uim.SetJCSDialogue(mDialogueType, this);

                // add to open window list if the window is open!
                AddToOpenWindowList();

                ResetDialogue();
            };
#endif

            if (mSoundPlayer == null)
            {
                this.mSoundPlayer = this.GetComponent <JCS_SoundPlayer>();
            }

            base.Awake();

            JCS_SoundSettings ss = JCS_SoundSettings.instance;


            // Assign Default Audio
            {
                if (mOpenWindowClip == null)
                {
                    this.mOpenWindowClip = ss.DEFAULT_OPEN_WINDOW_CLIP;
                }

                if (mCloseWindowClip == null)
                {
                    this.mCloseWindowClip = ss.DEFAULT_CLOSE_WINDOW_CLIP;
                }
            }
        }
Esempio n. 3
0
        /* Functions */

#if !(UNITY_5_4_OR_NEWER)
        // Called by Unity after a new level was loaded.
        private void OnLevelWasLoaded()
        {
            this.mRectTransform = this.GetComponent <RectTransform>();

            JCS_UIManager uim = JCS_UIManager.instance;

            // Once we load the scene we need to let new object
            // in the scene know about us!
            uim.SetJCSDialogue(mDialogueType, this);

            // add to open window list if the window is open!
            AddToOpenWindowList();

            ResetDialogue();
        }
Esempio n. 4
0
        //========================================
        //      Unity's function
        //------------------------------
        private void Awake()
        {
            instance = this;

            this.mOpenWindow = new LinkedList <JCS_DialogueObject>();
        }