Ejemplo n.º 1
0
        public void Start()
        {
            if (!leftControllerInteraction)
            {
                throw new UnassignedReferenceException("LeftControllerInteraction");
            }

            if (!rightControllerInteraction)
            {
                throw new UnassignedReferenceException("RightControllerInteraction");
            }

            if (!player)
            {
                throw new UnassignedReferenceException("player");
            }

            if (!groupBoundingBox)
            {
                throw new UnassignedReferenceException("groupBoundingBox");
            }

            _showGroups += ShowGroups;

            ImpressEventManager.StartListening("groupTool.showGroups", _showGroups);

            _hideGroups += HideGroups;

            ImpressEventManager.StartListening("groupTool.hideGroups", _hideGroups);

            _enableGrouping += _EnableGrouping;

            ImpressEventManager.StartListening("groupTool.enableGrouping", _enableGrouping);

            _disableGrouping += _DisableGrouping;

            ImpressEventManager.StartListening("groupTool.disableGrouping", _disableGrouping);

            _enableUngrouping += _EnableUngrouping;

            ImpressEventManager.StartListening("groupTool.enableUngrouping", _enableUngrouping);

            _disableUngrouping += _DisableUngrouping;

            ImpressEventManager.StartListening("groupTool.disableUngrouping", _disableUngrouping);

            _selectRed += _SelectRed;

            ImpressEventManager.StartListening("groupTool.selectRed", _selectRed);

            _selectBlue += _SelectBlue;

            ImpressEventManager.StartListening("groupTool.selectBlue", _selectBlue);
        }
        public void InitializeListeners()
        {
            _enable += _Enable;

            ImpressEventManager.StartListening("primitiveTool.enable", _enable);

            _disable += _Disable;

            ImpressEventManager.StartListening("primitiveTool.disable", _disable);

            _selectSphere += _SelectSphere;

            ImpressEventManager.StartListening("primitiveTool.selectSphere", _selectSphere);

            _selectCapsule += _SelectCapsule;

            ImpressEventManager.StartListening("primitiveTool.selectCapsule", _selectCapsule);

            _selectCube += _SelectCube;

            ImpressEventManager.StartListening("primitiveTool.selectCube", _selectCube);

            _selectPlane += _SelectPlane;

            ImpressEventManager.StartListening("primitiveTool.selectPlane", _selectPlane);

            _selectCylinder += _SelectCylinder;

            ImpressEventManager.StartListening("primitiveTool.selectCylinder", _selectCylinder);

            _deselectSphere += _DeselectSphere;

            ImpressEventManager.StartListening("primitiveTool.deselectSphere", _deselectSphere);

            _deselectCapsule += _DeselectCapsule;

            ImpressEventManager.StartListening("primitiveTool.deselectCapsule", _deselectCapsule);

            _deselectCube += _DeselectCube;

            ImpressEventManager.StartListening("primitiveTool.deselectCube", _deselectCube);

            _deselectPlane += _DeselectPlane;

            ImpressEventManager.StartListening("primitiveTool.deselectPlane", _deselectPlane);

            _deselectCylinder += _DeselectCylinder;

            ImpressEventManager.StartListening("primitiveTool.deselectCylinder", _deselectCylinder);
        }