Exemple #1
0
        public void HandleCacheCommand(ICacheDrawItem cmd, DrawingContext ctx, GameObject obj)
        {
            if (!cmd.CanDrawing(ctx, obj))
            {
                return;
            }

            string subKey = cmd.Key(ctx, obj);
            string k      = baseKey + subKey;

            if (cacheManager.HasKey(k))
            {
                return;
            }

            object s = cmd.State(ctx, obj);

            cacheManager.Add(k, cmd, s, Duration, Before, After);
        }