Example #1
0
        public void OnSelectGrassItem(object sender, IndexedGameObjectArgs args)
        {
            GameObject item      = args.gobject;
            GrassItem  grassItem = item.GetComponent <GrassItem>();

            SelectGrassObject(grassItem.grassObject);
        }
Example #2
0
 private void OnProjectClicked(object sender, IndexedGameObjectArgs args)
 {
     if (currentProject != args.gobject)
     {
         currentProject = args.gobject;
         HighlightSelectedProject();
         launchProjectButton.Disabled = false;
         projectButtons.SetActive(true);
     }
 }
Example #3
0
        private void OnListItemClicked(object sender, IndexedGameObjectArgs args)
        {
            GameObject   item         = args.gobject;
            GradientItem gradientItem = item.GetComponent <GradientItem>();
            SkySettings  itemSky      = gradientItem.Colors;

            SkySettings oldSky = new SkySettings {
                topColor = topButton.ImageColor, middleColor = middleButton.ImageColor, bottomColor = bottomButton.ImageColor
            };

            SetSkyColors(oldSky, itemSky);
        }
Example #4
0
        public void FireItem(Transform t)
        {
            // last clicked
            for (int i = 0; i < items.Count; ++i)
            {
                if (items[i].Content == t)
                {
                    CurrentIndex = i;
                }
            }

            IndexedGameObjectArgs args = new IndexedGameObjectArgs {
                gobject = t.gameObject, index = currentIndex
            };

            ItemClickedEvent?.Invoke(null, args);
        }
Example #5
0
        public void OnSelectCameraItem(object sender, IndexedGameObjectArgs args)
        {
            GameObject item       = args.gobject;
            CameraItem cameraItem = item.GetComponent <CameraItem>();

            // Select camera in scene
            CommandGroup command = new CommandGroup("Select Camera");

            try
            {
                ClearSelection();
                AddToSelection(cameraItem.cameraObject);
            }
            finally
            {
                command.Submit();
            }
        }
Example #6
0
        public void OnSelectLightItem(object sender, IndexedGameObjectArgs args)
        {
            GameObject item      = args.gobject;
            LightItem  lightItem = item.GetComponent <LightItem>();

            // Select light in scene
            CommandGroup command = new CommandGroup("Select Light");

            try
            {
                ClearSelection();
                AddToSelection(lightItem.lightObject);
            }
            finally
            {
                command.Submit();
            }
        }
Example #7
0
 void OnListItemClicked(object sender, IndexedGameObjectArgs args)
 {
     ShotManager.Instance.SetCurrentShotIndex(args.index);
 }