예제 #1
0
        //----------------------------------------------------------------------------------
        public override void FreeResources()
        {
            FieldControllerA.DestroyField();
            FieldControllerB.DestroyField();

            eManager.DestroyEntity(Data);
        }
예제 #2
0
 //-----------------------------------------------------------------------------------
 public override void FreeResources()
 {
     DestroyEntities();
     FieldControllerA.DestroyField();
     FieldControllerB.DestroyField();
     FieldControllerC.DestroyField();
 }
예제 #3
0
        //----------------------------------------------------------------------------------
        public override void ApplyEntitySpec()
        {
            GameObject[] arrGameObjectA = FieldControllerA.GetUnityGameObjects();
            GameObject[] arrGameObjectB = FieldControllerB.GetUnityGameObjects();

            eManager.RecreateSubstituter(Data, arrGameObjectA, arrGameObjectB);
        }
예제 #4
0
        //----------------------------------------------------------------------------------
        public override void ApplyEntitySpec()
        {
            GameObject[]  arrGameObjectA = FieldControllerA.GetUnityGameObjects();
            GameObject[]  arrGameObjectB = FieldControllerB.GetUnityGameObjects();
            CommandNode[] arrCommandNode = FieldController.GetCommandNodes();

            eManager.RecreateTriggerByContact(Data, arrGameObjectA, arrGameObjectB, arrCommandNode);
        }
예제 #5
0
        //-----------------------------------------------------------------------------------
        public override void Init()
        {
            base.Init();

            CNField.AllowedTypes allowedTypes = CNField.AllowedTypes.Geometry
                                                | CNField.AllowedTypes.RigidBodyNode;

            FieldControllerA.SetFieldType(allowedTypes);
            FieldControllerB.SetFieldType(allowedTypes);
        }
예제 #6
0
        //-----------------------------------------------------------------------------------
        public void CheckUpdate()
        {
            bool updateNeeded = (FieldControllerA.IsUpdateNeeded() ||
                                 FieldControllerB.IsUpdateNeeded());

            if (updateNeeded)
            {
                Data.NeedsUpdate = true;
                EditorUtility.SetDirty(Data);
            }
        }
예제 #7
0
        //-----------------------------------------------------------------------------------
        public override void Init()
        {
            base.Init();

            CNFieldContentType allowedTypes = CNFieldContentType.Geometry
                                              | CNFieldContentType.RigidBodyNode
                                              | CNFieldContentType.IrresponsiveNode;

            FieldControllerA.SetFieldContentType(allowedTypes);
            FieldControllerB.SetFieldContentType(allowedTypes);
        }
예제 #8
0
        //-----------------------------------------------------------------------------------
        public void CheckUpdate()
        {
            bool creationModeWithLocators = (Data.CreationMode == CNJointGroups.CreationModeEnum.AtLocatorsBBoxCenters ||
                                             Data.CreationMode == CNJointGroups.CreationModeEnum.AtLocatorsPositions ||
                                             Data.CreationMode == CNJointGroups.CreationModeEnum.AtLocatorsVertexes);

            bool updateNeeded = Data.NeedsUpdate || (FieldControllerA.IsUpdateNeeded() ||
                                                     FieldControllerB.IsUpdateNeeded() ||
                                                     (FieldControllerC.IsUpdateNeeded() && creationModeWithLocators));

            if (updateNeeded)
            {
                DestroyEntities();
            }
        }
예제 #9
0
        //-----------------------------------------------------------------------------------
        public void CreateEntities()
        {
            if (!IsExcludedInHierarchy)
            {
                GameObject[] arrGameObjectA;
                GameObject[] arrGameObjectB;
                Vector3[]    arrLocatorsC;

                GetFieldGameObjects(FieldControllerA, out arrGameObjectA);
                GetFieldGameObjects(FieldControllerB, out arrGameObjectB);

                bool fieldAIsReallyEmpty = FieldControllerA.HasNoReferences();
                bool fieldBIsReallyEmpty = FieldControllerB.HasNoReferences();

                GetFieldLocators(FieldControllerC, out arrLocatorsC);

                eManager.CreateMultiJoint(Data, arrGameObjectA, arrGameObjectB, arrLocatorsC, fieldAIsReallyEmpty, fieldBIsReallyEmpty);
                cnManager.SceneSelection();

                LoadState();
            }
        }
예제 #10
0
 //-----------------------------------------------------------------------------------
 public override void SetScopeId(uint scopeId)
 {
     FieldControllerA.SetScopeId(scopeId);
     FieldControllerB.SetScopeId(scopeId);
 }
예제 #11
0
 //-----------------------------------------------------------------------------------
 public override void BuildListItems()
 {
     FieldControllerA.BuildListItems();
     FieldControllerB.BuildListItems();
 }
예제 #12
0
 //-----------------------------------------------------------------------------------
 public override void StoreInfo()
 {
     FieldControllerA.StoreFieldInfo();
     FieldControllerB.StoreFieldInfo();
 }
예제 #13
0
 //-----------------------------------------------------------------------------------
 public override void LoadInfo()
 {
     FieldControllerA.RestoreFieldInfo();
     FieldControllerB.RestoreFieldInfo();
 }
예제 #14
0
 //-----------------------------------------------------------------------------------
 public void AddGameObjectsToB(UnityEngine.Object[] draggedObjects, bool recalculateFields)
 {
     FieldControllerB.AddGameObjects(draggedObjects, recalculateFields);
 }