Пример #1
0
//		CharacterManager charman;
//		JCTTransition jct;

        /// <summary>
        /// Implementation of MonoBehaviour Update method. Called once per frame.
        /// </summary>
        public override void Update()
        {
            if (currentVisibility != isVisible)
            {
                if (feathered == null && opaque == null)
                {
                    base.Update();
                }
//				currentVisibility = isVisible;
                if (cap != null)
                {
                    cap.setVisibility(isVisible);
                }
                if (feathered != null)
                {
                    feathered.setVisibility(isVisible);
                }
                if (opaque != null)
                {
                    opaque.setVisibility(isVisible);
                }

                currentVisibility = isVisible;
            }

            if (dirty)
            {
                SyncOverlay();
                dirty = false;
            }

            base.Update();
        }
Пример #2
0
//		CharacterManager charman;
//		JCTTransition jct;

        /// <summary>
        /// Implementation of FrameUpdate method. Called once per frame.  Called by the main character manager
        /// </summary>
        public override void FrameUpdate()
        {
            //Debug.Log("Updating hair...");
            if (currentVisibility != isVisible)
            {
                if (feathered == null && opaque == null)
                {
                    base.FrameUpdate();
                }
//				currentVisibility = isVisible;
                if (cap != null)
                {
                    cap.setVisibility(isVisible);
                }
                if (feathered != null)
                {
                    feathered.setVisibility(isVisible);
                }
                if (opaque != null)
                {
                    opaque.setVisibility(isVisible);
                }

                currentVisibility = isVisible;
            }

            if (dirty)
            {
                SyncOverlay();
                dirty = false;
            }

            base.FrameUpdate();
        }