RemoveEmptySlotIncludeMissing() public static method

public static RemoveEmptySlotIncludeMissing ( List inList ) : List
inList List
return List
 /// <summary>
 /// Refresh all languages text in game.
 /// </summary>
 public void RefreshLangTexts()
 {
     this.mLangTexts = JCS_Util.RemoveEmptySlotIncludeMissing(this.mLangTexts);
     foreach (JCS_LangText txt in mLangTexts)
     {
         txt.Refresh();
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Apply SPRITE to all indicator's image containers.
        /// </summary>
        /// <param name="sprite"> The sprite to apply. </param>
        private void SetSprite(Sprite sprite)
        {
            this.mIndicators = JCS_Util.RemoveEmptySlotIncludeMissing(this.mIndicators);

            foreach (Image ind in mIndicators)
            {
                ind.sprite = sprite;
            }
        }
        private void OrganizedLinked()
        {
            mManagedList = JCS_Util.RemoveEmptySlotIncludeMissing(mManagedList);

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

                Vector3 newOffset = mIndexOffset * index;

                node.TransformTweener.DoTween(newOffset);
            }
        }
Esempio n. 4
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_Util.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>
        /// 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_Util.RemoveEmptySlotIncludeMissing <JCS_3DWalkAction>(mWalkActions);

            mWalkActions.Add(wa);
        }
 /// <summary>
 /// Add a canvas to the group.
 /// </summary>
 public void AddCanvas(JCS_Canvas canvas)
 {
     this.mCanvases.Add(canvas);
     mCanvases = JCS_Util.RemoveEmptySlotIncludeMissing(mCanvases);
     mCanvases = SortCanvases_Insertion();
 }
 /// <summary>
 /// Remove all the null reference object from the list.
 /// </summary>
 private void RemoveNullRefInPauseActionList()
 {
     mPauseActions = JCS_Util.RemoveEmptySlotIncludeMissing(mPauseActions);
 }