Example #1
0
        public void DoUpdate(SpriteCache sc)
        {
            var valid = SpriteCache.IsValid(sc);

            if (valid)
            {
                this.SetSprite(this.target, sc);

                if (null != this.followers)
                {
                    for (int n = 0, cnt = this.followers.Length; n < cnt; ++n)
                    {
                        this.SetSprite(this.followers[n], sc);
                    }
                }
            }

            if (this.autoVisible)
            {
                this.SetAutoVisible(this.target, valid);

                if (null != this.followers)
                {
                    for (int n = 0, cnt = this.followers.Length; n < cnt; ++n)
                    {
                        this.SetAutoVisible(this.followers[n], valid);
                    }
                }
            }

            this.prevSpriteCache = sc;
        }