示例#1
0
    private void Start()
    {
        GetComponent <ObjectManipulator>().enabled = false;

        ModelClipPlaneCtrl   = ModelClipPlane.GetComponentInChildren <ModelClippingPlaneControl>();
        directionalIndicator = gameObject.GetComponentInChildren <DirectionalIndicator>();
        // Turn off the clipping plane on start
        DefaultModelMaterial.DisableKeyword("CLIPPING_ON");
        DefaultModelTransparentMaterial.DisableKeyword("CLIPPING_ON");
        DataVisualizationMaterial.DisableKeyword("CLIPPING_ON");

        LayerSubmenuState     = false;
        AnimationSpeedSubmenu = false;

        RefreshUserInterface();
        InitializeAddButtons();

        // This sets proper state of buttons and components like handDraggable
        ChangeTransformationState(TransformationState.None);

        SliderAnimationSpeed.GetComponent <PinchSlider>().OnValueUpdated.AddListener(
            delegate
        {
            AnimationSpeed = SliderAnimationSpeed.GetComponent <PinchSlider>().SliderValue *SliderSpeedFactor;
            Debug.Log(SliderAnimationSpeed.GetComponent <PinchSlider>().SliderValue.ToString());
            SliderAnimationSpeed.transform.Find("ThumbRoot/SpeedValue").GetComponent <TextMeshPro>().text = Math.Round(AnimationSpeed, 2).ToString();
        }
            );
    }
示例#2
0
    void Start()
    {
        ethan = GetComponent <ThirdPersonCharacter>();

        floor = GameObject.Find("Floor");

        GameObject indicatorManager = GameObject.Find("DirectionalIndicatorManager");

        directionalIndicator = indicatorManager.GetComponent <DirectionalIndicator>();

        text.transform.SetParent(Camera.main.transform, true);
        text.transform.localPosition = new Vector3(0, 0, 3);

        cupcakeManager = GameObject.Find("CupcakeManager").GetComponent <CupcakeManager>();

        startPosition = Camera.main.transform.position + Camera.main.transform.forward * 1.2f;

        usedPositions = new List <int>();

        SpatialUnderstanding.Instance.ScanStateChanged += Instance_ScanStateChanged;
        HideObjects();
    }