Пример #1
0
 internal RotationHandles(RotationHandlesConfiguration configuration)
 {
     Debug.Assert(configuration != null, "Can't create BoundsControlRotationHandles without valid configuration");
     config = configuration;
     config.handlesChanged.AddListener(HandlesChanged);
     config.colliderTypeChanged.AddListener(UpdateColliderType);
 }
        private void Awake()
        {
            if (targetObject == null)
            {
                targetObject = gameObject;
            }

            // ensure we have a default configuration in case there's none set by the user
            scaleHandlesConfiguration          = EnsureScriptable(scaleHandlesConfiguration);
            rotationHandlesConfiguration       = EnsureScriptable(rotationHandlesConfiguration);
            boxDisplayConfiguration            = EnsureScriptable(boxDisplayConfiguration);
            linksConfiguration                 = EnsureScriptable(linksConfiguration);
            handleProximityEffectConfiguration = EnsureScriptable(handleProximityEffectConfiguration);

            // instantiate runtime classes for visuals
            scaleHandles    = new ScaleHandles(scaleHandlesConfiguration);
            rotationHandles = new RotationHandles(rotationHandlesConfiguration);
            boxDisplay      = new BoxDisplay(boxDisplayConfiguration);
            links           = new Links(linksConfiguration);
            proximityEffect = new ProximityEffect(handleProximityEffectConfiguration);

            // subscribe to visual changes
            scaleHandlesConfiguration.configurationChanged.AddListener(CreateRig);
            scaleHandlesConfiguration.visibilityChanged.AddListener(ResetVisuals);
            rotationHandlesConfiguration.configurationChanged.AddListener(CreateRig);
            boxDisplayConfiguration.configurationChanged.AddListener(CreateRig);
            linksConfiguration.configurationChanged.AddListener(CreateRig);
        }
Пример #3
0
 internal RotationHandles(RotationHandlesConfiguration configuration)
     : base(configuration)
 {
 }
Пример #4
0
 internal RotationHandles(RotationHandlesConfiguration configuration)
 {
     Debug.Assert(configuration != null, "Can't create BoundsControlRotationHandles without valid configuration");
     config = configuration;
 }