Exemple #1
0
 /// <summary>
 /// Refresh all languages text in game.
 /// </summary>
 public void RefreshLangTexts()
 {
     this.mLangTexts = JCS_Utility.RemoveEmptySlotIncludeMissing(this.mLangTexts);
     foreach (JCS_LangText txt in mLangTexts)
     {
         txt.Refresh();
     }
 }
Exemple #2
0
        private void OrganizedLinked()
        {
            mManagedList = JCS_Utility.RemoveEmptySlotIncludeMissing(mManagedList);

            for (int index = 0; index < mManagedList.Count; ++index)
            {
                JCS_TransformLinkedObject node = mManagedList[index];

                Vector3 newOffset = mIndexOffset * index;

                node.TransformTweener.DoTween(newOffset);
            }
        }
Exemple #3
0
        /// <summary>
        /// Set the player to current portal label.
        /// </summary>
        private void SetPlayerToPortalByLabel()
        {
            JCS_PortalSettings jcsPs = JCS_PortalSettings.instance;

            // check manager exists?
            if (jcsPs == null)
            {
                return;
            }

            // check effect enable?
            if (!jcsPs.RESET_POSITION_AT_START)
            {
                return;
            }

            mPortals = JCS_Utility.RemoveEmptySlotIncludeMissing <JCS_2DPortal>(mPortals);

            foreach (JCS_2DPortal portal in mPortals)
            {
                if (portal.PortalLabel == jcsPs.SCENE_PORTAL_LABEL)
                {
                    // get the player
                    JCS_Player player = JCS_PlayerManager.instance.GetActivePlayer();

                    // NOTE(jenchieh): this uses execution order in Unity Engine.
                    // move the player to portal position.
                    player.transform.position = portal.transform.position;

                    // set the camera position
                    JCS_Camera.main.SetPosition(
                        portal.transform.position.x,
                        portal.transform.position.y);

                    break;
                }
            }
        }
 /// <summary>
 /// Remove all the null reference object from the list.
 /// </summary>
 private void RemoveNullRefInPauseActionList()
 {
     mPauseActions = JCS_Utility.RemoveEmptySlotIncludeMissing(mPauseActions);
 }
Exemple #5
0
        /// <summary>
        /// Add walk action to get manage.
        /// </summary>
        /// <param name="wa"> Target walk action you want to get manage. </param>
        public void AddWalkAction(JCS_3DWalkAction wa)
        {
            mWalkActions = JCS_Utility.RemoveEmptySlotIncludeMissing <JCS_3DWalkAction>(mWalkActions);

            mWalkActions.Add(wa);
        }