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

            SelectGrassObject(grassItem.grassObject);
        }
Exemplo n.º 2
0
 private void OnProjectClicked(object sender, IndexedGameObjectArgs args)
 {
     if (currentProject != args.gobject)
     {
         currentProject = args.gobject;
         HighlightSelectedProject();
         launchProjectButton.Disabled = false;
         projectButtons.SetActive(true);
     }
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 7
0
 void OnListItemClicked(object sender, IndexedGameObjectArgs args)
 {
     ShotManager.Instance.SetCurrentShotIndex(args.index);
 }