コード例 #1
0
        public void OnDeletePrefab()
        {
            prefabs.RemoveAt(prefabList.CurrentIndex);

            var currentDLItem = prefabList.GetItems()[prefabList.CurrentIndex];

            prefabList.RemoveItem(currentDLItem);

            prefabList.CurrentIndex = -1;
            RebuildPrefabList();
        }
コード例 #2
0
ファイル: SkyTool.cs プロジェクト: ubisoft/vrtist
        public void OnDeleteGradientItem()
        {
            GlobalState.Settings.skies.RemoveAt(gradientList.CurrentIndex);

            var currentDLItem = gradientList.GetItems()[gradientList.CurrentIndex];

            gradientList.RemoveItem(currentDLItem);

            gradientList.CurrentIndex = -1; // TODO: select the previous one? the one at the same index?
            RebuildGradientList();
        }
コード例 #3
0
ファイル: CameraTool.cs プロジェクト: ubisoft/vrtist
        private void OnCameraRemoved(GameObject gObject)
        {
            CameraController cameraController = gObject.GetComponent <CameraController>();

            if (null == cameraController)
            {
                return;
            }
            foreach (var item in cameraList.GetItems())
            {
                CameraItem cameraItem = item.Content.GetComponent <CameraItem>();
                if (cameraItem.cameraObject == gObject)
                {
                    cameraList.RemoveItem(item);
                    return;
                }
            }
        }
コード例 #4
0
ファイル: PaintGrassTool.cs プロジェクト: ubisoft/vrtist
        private void OnGrassRemoved(GameObject gObject)
        {
            GrassController grassController = gObject.GetComponent <GrassController>();

            if (null == grassController)
            {
                return;
            }
            foreach (var item in grassList.GetItems())
            {
                GrassItem grassItem = item.Content.GetComponent <GrassItem>();
                if (grassItem.grassObject == gObject)
                {
                    grassList.RemoveItem(item);
                    return;
                }
            }
        }
コード例 #5
0
        private void OnLightRemoved(GameObject gObject)
        {
            LightController controller = gObject.GetComponent <LightController>();

            if (null == controller)
            {
                return;
            }
            foreach (var item in lightList.GetItems())
            {
                LightItem lightItem = item.Content.GetComponent <LightItem>();
                if (lightItem.lightObject == gObject)
                {
                    lightList.RemoveItem(item);
                    return;
                }
            }
        }