//========================================
        //      Self-Define
        //------------------------------
        //----------------------
        // Public Functions

        //----------------------
        // Protected Functions

        //----------------------
        // Private Functions

        /// <summary>
        /// Spawn the text pool base on number of handle.
        /// </summary>
        private void SpawnTextPool()
        {
            if (mLogText == null)
            {
                JCS_Debug.LogReminders(
                    "No log text assign in the text pool...");

                return;
            }


            // NOTE(JenChieh): this might change in
            // the future.
            // Get the log system from the
            // same transfrom/node.
            JCS_IGLogSystem logSystem = this.GetComponent <JCS_IGLogSystem>();


            mLogTexts = new JCS_Vector <JCS_LogText>(mNumberOfHandle);

            for (int count = 0;
                 count < mNumberOfHandle;
                 ++count)
            {
                // spawn a new game object,
                // and get the component
                JCS_LogText logText = (JCS_LogText)JCS_Utility.SpawnGameObject(mLogText);

                // add to array
                mLogTexts.set(count, logText);

                // set parent
                JCS_Utility.SetParentWithoutLosingInfo(logText.transform, this.transform);

                // NOTE(JenChieh): this might change in
                // the future.
                // set the log system if there is one.
                logText.SetIGLogSystem(logSystem);
            }
        }
Beispiel #2
0
 public void SetIGLogSystem(JCS_IGLogSystem sys)
 {
     this.mIGLogSystem = sys;
 }