Exemple #1
0
        public void SetData(LineContext context, TracklineData data, float timeScale)
        {
            this.context = context;
            this.data    = data;

            //itemFactory = context.Get<ActionItemFactory>();

            for (int i = 0; i < data.Actions.Count; ++i)
            {
                ActionData actionData = data.Actions[i];
                if (actionData == null || actionData.Platform == ActionPlatform.Server)
                {
                    continue;
                }

                ActionItem actionItem = itemFactory.RetainItem(actionData.GetType());
                if (actionItem == null)
                {
                    continue;
                }

                actionItem.SetData(context, actionData, timeScale);
                actionItems.Add(actionItem);
            }
        }
Exemple #2
0
        public void DoDestroy()
        {
            for (int i = runningItems.Count - 1; i >= 0; --i)
            {
                var item = runningItems[0];
                item.DoExit();

                itemFactory.ReleaseItem(item);
            }
            runningItems.Clear();

            for (int i = actionItems.Count - 1; i >= 0; --i)
            {
                var item = actionItems[i];

                itemFactory.ReleaseItem(item);
            }
            actionItems.Clear();

            context     = null;
            data        = null;
            elapsedTime = 0.0f;
            itemFactory = null;
        }