Exemple #1
0
    public void Start()
    {
        drawingPanelAnim.SetBool("openPanel", false);
        colourSelectorAnim.SetBool("show", false);
        floorDrawingPanelAnim.SetBool("slideIn", false);
        AllCamAnimationsFalse();
        wallSelected = false;
        blankColor   = new Color(1 / 255, 1 / 255, 1 / 255, 0.2f);
        editView     = EditingView.EXTERIOR;
        cubeType     = CubeType.NULL;

        // Blank cube types only
        if (blankCubeType == CubeType.GRASS)
        {
            blankCubePrefab = grassPrefab;
        }
        else if (blankCubeType == CubeType.SAND)
        {
            blankCubePrefab = sandPrefab;
        }
        else if (blankCubeType == CubeType.DIRT)
        {
            blankCubePrefab = dirtPrefab;
        }
        else if (blankCubeType == CubeType.SNOW)
        {
            blankCubePrefab = snowPrefab;
        }
    }
 protected virtual void ApplyOptions(bool setOptions)
 {
     if (LockApply != 0)
     {
         return;
     }
     for (int i = 0; i < PrintFlags.Length; i++)
     {
         CheckEdit chb = CheckEditByIndex(i);
         if (chb != null)
         {
             SetOptions.SetOptionValueByString(PrintFlags[i], setOptions ? EditingView.OptionsPrint :
                                               CurrentView.OptionsPrint, chb.Checked);
         }
     }
     EditingView.FireChangedInternal();
 }
Exemple #3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            StyleButton(OKButton);
            StyleButton(CancelButton);

            StylePanel1(this.AttackTextView);
            StyleBackground(BackgroundView);

            CMStyles.StyleBasicPanel(EditingView);

            MeleeView.Editable  = false;
            MeleeView.Text      = _Monster.MeleeString(_Attacks);
            RangedView.Editable = false;
            RangedView.Text     = _Monster.RangedString(_Attacks);

            _ScrollView     = new UIScrollView();
            _SetChoiceView  = new GradientView();
            _SetControlView = new GradientView();

            _NextSetButton = new GradientButton();
            _NextSetButton.SetImage(UIExtensions.GetSmallIcon("next"), UIControlState.Normal);
            _NextSetButton.TouchUpInside += HandleNextSetButtonClicked;
            _LastSetButton = new GradientButton();
            _LastSetButton.SetImage(UIExtensions.GetSmallIcon("prev"), UIControlState.Normal);
            _LastSetButton.TouchUpInside += HandleLastSetButtonClicked;

            _SetLabel                 = new UILabel();
            _SetLabel.Font            = UIFont.BoldSystemFontOfSize(16);
            _SetLabel.BackgroundColor = 0x00000000.UIColor();
            _SetLabel.TextColor       = 0xFFFFFFFF.UIColor();
            _SetLabel.TextAlignment   = UITextAlignment.Center;

            _SetChoiceView.Add(_NextSetButton);
            _SetChoiceView.Add(_LastSetButton);
            _SetChoiceView.Add(_SetLabel);


            _AddAttackButton = new GradientButton();
            _AddAttackButton.SetText("Add Attack");
            StyleButton(_AddAttackButton);

            _AddSetButton = new GradientButton();
            _AddSetButton.SetText("Add");
            StyleButton(_AddSetButton);
            _SetChoiceView.Add(_AddSetButton);


            _DeleteSetButton = new GradientButton();
            _DeleteSetButton.SetText("Delete");
            StyleButton(_DeleteSetButton);
            _SetChoiceView.Add(_DeleteSetButton);


            MeleeButton.Data   = TypeTab.MeleeTab;
            RangedButton.Data  = TypeTab.RangedTab;
            NaturalButton.Data = TypeTab.NaturalTab;

            foreach (var v in new GradientButton[] { MeleeButton, RangedButton, NaturalButton })
            {
                v.TouchUpInside += HandleTypeButtonClicked;
                v.StyleTab(false);
                v.Border = 2;
            }


            EditingView.Add(_ScrollView);
            EditingView.Add(_SetChoiceView);
            EditingView.Add(_SetControlView);

            _SetControlView.Add(_AddAttackButton);



            CMStyles.StyleBasicPanel(_SetChoiceView);
            CMStyles.StyleBasicPanel(_SetControlView);

            _SetChoiceView.CornerRadii = new float[]
            { _SetChoiceView.CornerRadius, _SetChoiceView.CornerRadius, 0, 0 };
            _SetControlView.CornerRadii = new float[]
            { 0, 0, _SetChoiceView.CornerRadius, _SetChoiceView.CornerRadius };


            _AddSetButton.TouchUpInside    += HandleAddSetButtonClicked;
            _DeleteSetButton.TouchUpInside += HandleDeleteSetClicked;



            _AddAttackPopover = new ButtonStringPopover(_AddAttackButton);
            _AddAttackPopover.WillShowPopover += HandleWillShowAddAttacksPopover;
            _AddAttackPopover.ItemClicked     += HandleAddAttackItemClicked;

            _SelectedTab = TypeTab.MeleeTab;
            MeleeButton.StyleTab(true);

            SetupMeleeTab();
            SetupAttackViews();
        }
//autofac uses this

        public WorkspaceView(WorkspaceModel model,
                             Control libraryView,
                             EditingView.Factory editingViewFactory,
                             PublishView.Factory pdfViewFactory,
                             CollectionSettingsDialog.Factory settingsDialogFactory,
                             EditBookCommand editBookCommand,
                             SendReceiveCommand sendReceiveCommand,
                             SelectedTabAboutToChangeEvent selectedTabAboutToChangeEvent,
                             SelectedTabChangedEvent selectedTabChangedEvent,
                             LocalizationChangedEvent localizationChangedEvent,
                             FeedbackDialog.Factory feedbackDialogFactory,
                             ProblemReporterDialog.Factory problemReportDialogFactory,
                             //ChorusSystem chorusSystem,
                             LocalizationManager localizationManager

                             )
        {
            _model = model;
            _settingsDialogFactory         = settingsDialogFactory;
            _selectedTabAboutToChangeEvent = selectedTabAboutToChangeEvent;
            _selectedTabChangedEvent       = selectedTabChangedEvent;
            _localizationChangedEvent      = localizationChangedEvent;
            _feedbackDialogFactory         = feedbackDialogFactory;
            _problemReportDialogFactory    = problemReportDialogFactory;
            //_chorusSystem = chorusSystem;
            _localizationManager  = localizationManager;
            _model.UpdateDisplay += new System.EventHandler(OnUpdateDisplay);
            InitializeComponent();

            _checkForNewVersionMenuItem.Visible = SIL.PlatformUtilities.Platform.IsWindows;

            _toolStrip.Renderer = new NoBorderToolStripRenderer();

            //we have a number of buttons which don't make sense for the remote (therefore vulnerable) low-end user
            //_settingsLauncherHelper.CustomSettingsControl = _toolStrip;

            _settingsLauncherHelper.ManageComponent(_settingsButton);

            //NB: the rest of these aren't really settings, but we're using that feature to simplify this menu down to what makes sense for the easily-confused user
            _settingsLauncherHelper.ManageComponent(_openCreateCollectionButton);
            _settingsLauncherHelper.ManageComponent(_keyBloomConceptsMenuItem);
            _settingsLauncherHelper.ManageComponent(_makeASuggestionMenuItem);
            _settingsLauncherHelper.ManageComponent(_webSiteMenuItem);
            _settingsLauncherHelper.ManageComponent(_showLogMenuItem);
            _settingsLauncherHelper.ManageComponent(_releaseNotesMenuItem);
            _settingsLauncherHelper.ManageComponent(_divider2);
            _settingsLauncherHelper.ManageComponent(_divider3);
            _settingsLauncherHelper.ManageComponent(_divider4);

            OnSettingsProtectionChanged(this, null);            //initial setup
            SettingsProtectionSettings.Default.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(OnSettingsProtectionChanged);


            _uiLanguageMenu.Visible = true;
            _settingsLauncherHelper.ManageComponent(_uiLanguageMenu);

            editBookCommand.Subscribe(OnEditBook);
            sendReceiveCommand.Subscribe(OnSendReceive);

            //Cursor = Cursors.AppStarting;
            Application.Idle += new EventHandler(Application_Idle);
            Text              = _model.ProjectName;

            //SetupTabIcons();

            //
            // _collectionView
            //
            this._collectionView      = (LibraryView)libraryView;
            this._collectionView.Dock = System.Windows.Forms.DockStyle.Fill;

            //
            // _editingView
            //
            this._editingView      = editingViewFactory();
            this._editingView.Dock = System.Windows.Forms.DockStyle.Fill;

            //
            // _pdfView
            //
            this._publishView      = pdfViewFactory();
            this._publishView.Dock = System.Windows.Forms.DockStyle.Fill;

            _collectionTab.Tag = _collectionView;
            _publishTab.Tag    = _publishView;
            _editTab.Tag       = _editingView;

            this._collectionTab.Text = _collectionView.CollectionTabLabel;

            SetTabVisibility(_publishTab, false);
            SetTabVisibility(_editTab, false);

//			if (Program.StartUpWithFirstOrNewVersionBehavior)
//			{
//				_tabStrip.SelectedTab = _infoTab;
//				SelectPage(_infoView);
//			}
//			else
//			{
            _tabStrip.SelectedTab = _collectionTab;
            SelectPage(_collectionView);
//			}

            if (SIL.PlatformUtilities.Platform.IsMono)
            {
                // Without this adjustment, we lose some controls on smaller resolutions.
                AdjustToolPanelLocation(true);
                // in mono auto-size causes the height of the tab strip to be too short
                _tabStrip.AutoSize = false;
            }

            SetupUiLanguageMenu();
            _viewInitialized = false;
        }
        void ReleaseDesignerOutlets()
        {
            if (OKButton != null)
            {
                OKButton.Dispose();
                OKButton = null;
            }

            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }

            if (AttackTextView != null)
            {
                AttackTextView.Dispose();
                AttackTextView = null;
            }

            if (MeleeView != null)
            {
                MeleeView.Dispose();
                MeleeView = null;
            }

            if (RangedView != null)
            {
                RangedView.Dispose();
                RangedView = null;
            }

            if (EditingView != null)
            {
                EditingView.Dispose();
                EditingView = null;
            }

            if (MeleeButton != null)
            {
                MeleeButton.Dispose();
                MeleeButton = null;
            }

            if (RangedButton != null)
            {
                RangedButton.Dispose();
                RangedButton = null;
            }

            if (NaturalButton != null)
            {
                NaturalButton.Dispose();
                NaturalButton = null;
            }

            if (BackgroundView != null)
            {
                BackgroundView.Dispose();
                BackgroundView = null;
            }
        }
Exemple #6
0
//autofac uses this

        public WorkspaceView(WorkspaceModel model,
                             Control libraryView,
                             EditingView.Factory editingViewFactory,
                             PublishView.Factory pdfViewFactory,
                             CollectionSettingsDialog.Factory settingsDialogFactory,
                             EditBookCommand editBookCommand,
                             SendReceiveCommand sendReceiveCommand,
                             SelectedTabAboutToChangeEvent selectedTabAboutToChangeEvent,
                             SelectedTabChangedEvent selectedTabChangedEvent,
                             FeedbackDialog.Factory feedbackDialogFactory,
                             ChorusSystem chorusSystem,
                             Sparkle sparkleApplicationUpdater,
                             LocalizationManager localizationManager

                             )
        {
            _model = model;
            _settingsDialogFactory         = settingsDialogFactory;
            _selectedTabAboutToChangeEvent = selectedTabAboutToChangeEvent;
            _selectedTabChangedEvent       = selectedTabChangedEvent;
            _feedbackDialogFactory         = feedbackDialogFactory;
            _chorusSystem = chorusSystem;
            _sparkleApplicationUpdater = sparkleApplicationUpdater;
            _localizationManager       = localizationManager;
            _model.UpdateDisplay      += new System.EventHandler(OnUpdateDisplay);
            InitializeComponent();

#if !DEBUG
            _sparkleApplicationUpdater.CheckOnFirstApplicationIdle();
#endif
            _toolStrip.Renderer = new NoBorderToolStripRenderer();

            //we have a number of buttons which don't make sense for the remote (therefore vulnerable) low-end user
            //_settingsLauncherHelper.CustomSettingsControl = _toolStrip;

            _settingsLauncherHelper.ManageComponent(_settingsButton);

            //NB: the rest of these aren't really settings, but we're using that feature to simplify this menu down to what makes sense for the easily-confused user
            _settingsLauncherHelper.ManageComponent(_openCreateCollectionButton);
            _settingsLauncherHelper.ManageComponent(deepBloomPaperToolStripMenuItem);
            _settingsLauncherHelper.ManageComponent(_makeASuggestionMenuItem);
            _settingsLauncherHelper.ManageComponent(_webSiteMenuItem);
            _settingsLauncherHelper.ManageComponent(_showLogMenuItem);
            _settingsLauncherHelper.ManageComponent(_releaseNotesMenuItem);
            _settingsLauncherHelper.ManageComponent(_divider2);
            _settingsLauncherHelper.ManageComponent(_divider3);
            _settingsLauncherHelper.ManageComponent(_divider4);

            OnSettingsProtectionChanged(this, null);            //initial setup
            SettingsProtectionSettings.Default.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(OnSettingsProtectionChanged);


            _uiLanguageMenu.Visible = true;
            _settingsLauncherHelper.ManageComponent(_uiLanguageMenu);

            editBookCommand.Subscribe(OnEditBook);
            sendReceiveCommand.Subscribe(OnSendReceive);

            //Cursor = Cursors.AppStarting;
            Application.Idle += new EventHandler(Application_Idle);
            Text              = _model.ProjectName;

            //SetupTabIcons();

            //
            // _collectionView
            //
            this._collectionView      = (LibraryView)libraryView;
            this._collectionView.Dock = System.Windows.Forms.DockStyle.Fill;

            //
            // _editingView
            //
            this._editingView      = editingViewFactory();
            this._editingView.Dock = System.Windows.Forms.DockStyle.Fill;

            //
            // _pdfView
            //
            this._publishView      = pdfViewFactory();
            this._publishView.Dock = System.Windows.Forms.DockStyle.Fill;

            _collectionTab.Tag = _collectionView;
            _publishTab.Tag    = _publishView;
            _editTab.Tag       = _editingView;

            this._collectionTab.Text = _collectionView.CollectionTabLabel;

            SetTabVisibility(_publishTab, false);
            SetTabVisibility(_editTab, false);

//			if (Program.StartUpWithFirstOrNewVersionBehavior)
//			{
//				_tabStrip.SelectedTab = _infoTab;
//				SelectPage(_infoView);
//			}
//			else
//			{
            _tabStrip.SelectedTab = _collectionTab;
            SelectPage(_collectionView);
//			}

            SetupUILanguageMenu();
        }
Exemple #7
0
    void Update()
    {
        blankCubeType = GameObject.Find("GameData").GetComponent <GameData>().blankCubeType;
        if (blankCubeType == CubeType.GRASS)
        {
            blankCubePrefab = grassPrefab;
        }
        else if (blankCubeType == CubeType.SAND)
        {
            blankCubePrefab = sandPrefab;
        }
        else if (blankCubeType == CubeType.DIRT)
        {
            blankCubePrefab = dirtPrefab;
        }
        else if (blankCubeType == CubeType.SNOW)
        {
            blankCubePrefab = snowPrefab;
        }

        if (editView == EditingView.EXTERIOR && chosenRequirements && drawingPanelAnim.GetBool("openPanel"))
        {
            rotateButton.SetActive(true);
        }
        else
        {
            rotateButton.SetActive(false);
        }



        if (cubeType == CubeType.NULL)
        {
            cubeType = blankCubeType;
        }



        if (cubeType == CubeType.GRASS)
        {
            currentCubePrefab      = grassPrefab;
            currentCubeAboveGround = false;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.WATER)
        {
            currentCubePrefab      = waterCubePrefab;
            currentCubeAboveGround = false;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.WOOD)
        {
            currentCubePrefab      = woodPrefab;
            currentCubeAboveGround = true;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.FIRE)
        {
            currentCubePrefab      = firePrefab;
            currentCubeAboveGround = true;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.BURNING)
        {
            currentCubePrefab      = burningPrefab;
            currentCubeAboveGround = true;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.PAVING)
        {
            currentCubePrefab      = pavingPrefab;
            currentCubeAboveGround = false;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.FLOWER)
        {
            currentCubePrefab      = flowerPrefab;
            currentCubeAboveGround = true;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.SAND)
        {
            currentCubePrefab      = sandPrefab;
            currentCubeAboveGround = false;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.STONE)
        {
            currentCubePrefab      = stonePrefab;
            currentCubeAboveGround = true;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.DIRT)
        {
            currentCubePrefab      = dirtPrefab;
            currentCubeAboveGround = false;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.FENCE)
        {
            currentCubePrefab      = fencePrefab;
            currentCubeAboveGround = true;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.FENCECORNER)
        {
            currentCubePrefab      = fenceCornerPrefab;
            currentCubeAboveGround = true;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.FENCEEND)
        {
            currentCubePrefab      = fenceEndPrefab;
            currentCubeAboveGround = true;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.SNOW)
        {
            currentCubePrefab      = snowPrefab;
            currentCubeAboveGround = false;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.LANTERN)
        {
            currentCubePrefab      = lanternPrefab;
            currentCubeAboveGround = true;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.TREE)
        {
            currentCubePrefab      = treePrefab;
            currentCubeAboveGround = true;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.LONGGRASS)
        {
            currentCubePrefab      = longGrassPrefab;
            currentCubeAboveGround = true;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.PONDWATER)
        {
            currentCubePrefab      = pondWaterPrefab;
            currentCubeAboveGround = false;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.NUCLEAR)
        {
            currentCubePrefab      = nuclearPrefab;
            currentCubeAboveGround = false;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.LILYPAD)
        {
            currentCubePrefab      = lilypadPrefab;
            currentCubeAboveGround = true;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.LAVA)
        {
            currentCubePrefab      = lavaPrefab;
            currentCubeAboveGround = false;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.LAMPPOST)
        {
            currentCubePrefab      = lamppostPrefab;
            currentCubeAboveGround = true;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.ICE)
        {
            currentCubePrefab      = icePrefab;
            currentCubeAboveGround = false;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.SAPLING)
        {
            currentCubePrefab      = saplingPrefab;
            currentCubeAboveGround = false;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.PEBBLES)
        {
            currentCubePrefab      = pebblesPrefab;
            currentCubeAboveGround = false;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.TORCH)
        {
            currentCubePrefab      = torchPrefab;
            currentCubeAboveGround = false;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.FLOORLIGHT)
        {
            currentCubePrefab      = floorLightPrefab;
            currentCubeAboveGround = false;
            currentCubeType        = cubeType;
        }
        else if (cubeType == CubeType.RAINBOWLIGHT)
        {
            currentCubePrefab      = rainbowLightPrefab;
            currentCubeAboveGround = false;
            currentCubeType        = cubeType;
        }



        if (editView == EditingView.EXTERIOR)
        {
            if (Input.GetKeyDown(KeyCode.M) || savingOrLoading)
            {
                Debug.Log("closing draw panel");
                drawingPanelAnim.SetBool("openPanel", false);
            }
            if ((Input.GetKeyDown(KeyCode.N)) && wallSelected)
            {
                drawingPanelAnim.SetBool("openPanel", true);
            }
        }


        if (editView == EditingView.GROUND)
        {
            if (Input.GetKeyDown(KeyCode.M) || savingOrLoading)
            {
                floorDrawingPanelAnim.gameObject.SetActive(false);
            }
            if (Input.GetKeyDown(KeyCode.N))
            {
                floorDrawingPanelAnim.gameObject.SetActive(true);
            }
        }



        if (chosenRequirements && reqGenScript.canSelectWalls && !loadSavePanel.activeInHierarchy && !savePanel.activeInHierarchy)
        {
            if (Input.GetButtonDown("Fire1"))
            {
                Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

                RaycastHit hit;
                if (Physics.Raycast(ray, out hit))
                {
                    if (!colourSelectorScript.colourPipetteSelected)
                    {
                        if (!gridScript.graphicalRaycasterHit)
                        {
                            if (hit.collider.gameObject.tag == "BackWall" || hit.collider.gameObject.tag == "FrontWall" || hit.collider.gameObject.tag == "RightWall" || hit.collider.gameObject.tag == "LeftWall")
                            {
                                /* // if the camera is in birds eye position
                                 * if (cameraAnim.GetBool("FrontToBirdsEye") || cameraAnim.GetBool("ZoomToBirdsEye"))
                                 * {
                                 *  AllCamAnimationsFalse();
                                 *  cameraAnim.SetBool("BirdsEyeToFront", true);
                                 * }
                                 * // else is the camera is zoomed on the room
                                 * else if (cameraAnim.GetBool("BirdsEyeToZoom"))
                                 * {
                                 *  AllCamAnimationsFalse();
                                 *  cameraAnim.SetBool("ZoomToFront", true);
                                 * }*/


                                // if a wall has not already been selected
                                if (!wallSelected && reqGenScript.canSelectWalls)
                                {
                                    // Find the tag of the cube hit by the raycast
                                    selectedWallTag = hit.transform.gameObject.tag;
                                    // Highlight every cube with this tag
                                    HighlightWall(selectedWallTag);
                                }
                                else if (wallSelected && reqGenScript.canSelectWalls) // if a wall is selected
                                {
                                    // deselect all walls
                                    DeselectWalls();
                                    // Find the tag of the cube hit by the raycast
                                    selectedWallTag = hit.transform.gameObject.tag;
                                    // Highlight every cube with this tag
                                    HighlightWall(selectedWallTag);
                                }
                            }

                            // If hit the grass
                            if (hit.collider.gameObject.tag == "Floor" && hit.collider.gameObject.name != "BlackFloorCube")
                            {
                                DeselectWalls();

                                /* drawingPanelAnim.SetBool("openPanel", false);
                                 * if (cameraAnim.GetBool("BirdsEyeToZoom"))
                                 * {
                                 *  AllCamAnimationsFalse();
                                 *  cameraAnim.SetBool("ZoomToBirdsEye", true);
                                 * }
                                 * else
                                 * {
                                 *  AllCamAnimationsFalse();
                                 *  cameraAnim.SetBool("FrontToBirdsEye", true);
                                 * }
                                 */
                                //Vector3 cubePos = hit.collider.gameObject.transform.position;
                            }

                            if (hit.collider.gameObject.name == "BlackFloorCube")
                            {
                                /* if (cameraAnim.GetBool("FrontToBirdsEye") || cameraAnim.GetBool("ZoomToBirdsEye"))
                                 * {
                                 *  AllCamAnimationsFalse();
                                 *  cameraAnim.SetBool("BirdsEyeToZoom", true);
                                 *
                                 * }
                                 *
                                 * drawingPanelAnim.SetBool("openPanel", false);
                                 */
                            }
                        }
                    }
                }
            }



            // Floor editing
            if (Input.GetButton("Fire1"))
            {
                if (editView == EditingView.GROUND)
                {
                    Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

                    RaycastHit hit;
                    if (Physics.Raycast(ray, out hit))
                    {
                        if (hit.collider.gameObject.tag == "Floor" && hit.collider.gameObject.name != "BlackFloorCube")
                        {
                            StartCoroutine(SpawnInCube(hit, currentCubeType));
                        }
                    }
                }
            }

            if (Input.GetButton("Fire2"))
            {
                if (editView == EditingView.GROUND)
                {
                    Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

                    RaycastHit hit;
                    if (Physics.Raycast(ray, out hit))
                    {
                        if (hit.collider.gameObject.tag == "Floor" && hit.collider.gameObject.name != "BlackFloorCube")
                        {
                            Vector3 position = hit.collider.transform.position;
                            Destroy(hit.collider.gameObject);
                            GameObject newCube = Instantiate(blankCubePrefab, position, Quaternion.identity);
                            newCube.tag = "Floor";
                        }
                    }
                }
            }



            // if the current camera animation focuses on the front
            if (cameraAnim.GetBool("BirdsEyeToFront") || cameraAnim.GetBool("ZoomToFront"))
            {
                editView = EditingView.EXTERIOR;
                if (floorDrawingPanelAnim.GetBool("slideIn"))
                {
                    floorDrawingPanelAnim.SetBool("slideIn", false);
                }
                gridScript.mainCamera.orthographic = false;
                gridScript.orthoToggle.isOn        = false;
            }
            // else if the current camera animation focuses on the zoom
            else if (cameraAnim.GetBool("BirdsEyeToZoom"))
            {
                editView = EditingView.INTERIOR;
                if (floorDrawingPanelAnim.GetBool("slideIn"))
                {
                    floorDrawingPanelAnim.SetBool("slideIn", false);
                }
                gridScript.mainCamera.orthographic = false;
                gridScript.orthoToggle.isOn        = false;
            }
            else if (cameraAnim.GetBool("ZoomToBirdsEye") || cameraAnim.GetBool("FrontToBirdsEye"))
            {
                editView = EditingView.GROUND;
                if (!floorDrawingPanelAnim.GetBool("slideIn"))
                {
                    floorDrawingPanelAnim.SetBool("slideIn", true);
                }
            }
        }
    }