예제 #1
0
    private void InitiateIsolate()
    {
        if (AtLeastOneStructureIsMovingOrResizing)
        {
            return;
        }

        if (currentlyInIsolatedMode)
        {
            Debug.Log("InitiateIsolate() was called, but the brain is currently in isolation mode");
            return;
        }

        if (stateAccessor.ChangeMode(StateAccessor.Mode.Isolated))
        {
            GetComponent <ResetState>().ResetInteractions();
            brain.GetComponent <ExplodingCommands>().enabled = false;
            CalculateDefaultAndFinalPositionsScalesAndRotations();
            ResetStructurePositionsAndScales();
            StartSettingUpMinimap();

            //cortexBoxCollider.enabled = true;
            currentlyInIsolatedMode = true;
        }
        else
        {
            Debug.Log("Isolate Structures: Cannot currently enter isolate mode.");
        }
    }
예제 #2
0
    public bool ResetMode()
    {
        if (stateAccessor.ChangeMode(StateAccessor.Mode.Default))
        {
            brain.GetComponent <IsolateStructures>().ResetIsolate();
            //MRICollection.GetComponent<MRIManager>().ResetMRI();
            return(true);
        }

        return(false);
    }
예제 #3
0
    public void ProcessMRIButtonAction()
    {
        // TurnOnMRIMode();

        /* if (ToggleIsCurrentlyInMRIMode())
         * {
         *   SetMRICollectionActive();
         *   customMessages.SendMRIButtonMessage(isInMRIMode);
         * }
         * else
         * {
         *   Debug.Log("MRIManager: Cannot currently switch modes.");
         * }*/

        if (stateAccessor.ChangeMode(StateAccessor.Mode.MRI))
        {
            LoadOrUnloadMRIObjects(true);
            if (customMessages != null)
            {
                customMessages.SendMRIButtonMessage(isInMRIMode);
            }
        }
    }