コード例 #1
0
        private void InstantiateBlock(VFXBlockController blockController)
        {
            Profiler.BeginSample("VFXContextUI.InstantiateBlock");
            Profiler.BeginSample("VFXContextUI.new VFXBlockUI");
            var blockUI = new VFXBlockUI();

            Profiler.EndSample();
            blockUI.controller = blockController;

            m_BlockContainer.Add(blockUI);
            Profiler.EndSample();
        }
コード例 #2
0
        private VFXBlockUI InstantiateBlock(VFXBlockController blockController)
        {
            Profiler.BeginSample("VFXContextUI.InstantiateBlock");
            Profiler.BeginSample("VFXContextUI.new VFXBlockUI");
            var blockUI = new VFXBlockUI();

            Profiler.EndSample();
            blockUI.controller      = blockController;
            blocks[blockController] = blockUI;
            Profiler.EndSample();

            return(blockUI);
        }
コード例 #3
0
        private void SyncControllers()
        {
            var m_NewControllers = new List <VFXBlockController>();

            foreach (var block in model.children)
            {
                var newController = m_BlockControllers.Find(p => p.model == block);
                if (newController == null) // If the controller does not exist for this model, create it
                {
                    newController = new VFXBlockController(block, this);
                    newController.ForceUpdate();
                }
                m_NewControllers.Add(newController);
            }

            foreach (var deletedController in m_BlockControllers.Except(m_NewControllers))
            {
                deletedController.OnDisable();
            }
            m_BlockControllers = m_NewControllers;
        }
コード例 #4
0
ファイル: VFXPaste.cs プロジェクト: AgeOfAgatha/UnitedAgatha
        private void RegisterContexts(VFXViewController viewController)
        {
            for (int i = 0; i < newContexts.Count; ++i)
            {
                if (newContexts[i].Key != null)
                {
                    VFXContextController controller = viewController.GetNodeController(newContexts[i].Key, 0) as VFXContextController;
                    newControllers[ContextFlag | (uint)i] = controller;

                    for (int j = 0; j < newContexts[i].Value.Count; ++j)
                    {
                        var block = newContexts[i].Value[j];
                        if (block != null)
                        {
                            VFXBlockController blockController = controller.blockControllers.First(t => t.model == block);
                            if (blockController != null)
                            {
                                newControllers[GetBlockID((uint)i, (uint)j)] = blockController;
                            }
                        }
                    }
                }
            }
        }
コード例 #5
0
 public int FindBlockIndexOf(VFXBlockController controller)
 {
     return(m_BlockControllers.IndexOf(controller));
 }