Beispiel #1
0
 public void EnableModule(AdvancedModeModule module)
 {
     if (module.shouldDisplay == false)
     {
         return;
     }
     this._currentModule = module;
     module.isEnabled    = true;
     foreach (AdvancedModeModule module2 in this._modules)
     {
         if (module2 != module)
         {
             module2.isEnabled = false;
         }
     }
 }
Beispiel #2
0
        protected virtual void Awake()
        {
            if (_onPreRenderCallbackAdded == false)
            {
                _onPreRenderCallbackAdded = true;
                PHPE._self._cameraEventsDispatcher.onPreRender += UpdateGizmosIf;
            }

            _poseControllers.Add(this);
            foreach (KeyValuePair <int, ObjectCtrlInfo> pair in Studio.Studio.Instance.dicObjectCtrl)
            {
                if (pair.Value.guideObject.transformTarget.gameObject == this.gameObject)
                {
                    this._target = new GenericOCITarget(pair.Value);
                    break;
                }
            }

            this.FillChildObjects();

            this._bonesEditor = new BonesEditor(this, this._target);
            this._modules.Add(this._bonesEditor);

            this._collidersEditor = new CollidersEditor(this, this._target);
            this._modules.Add(this._collidersEditor);

            this._dynamicBonesEditor = new DynamicBonesEditor(this, this._target);
            this._modules.Add(this._dynamicBonesEditor);

            this._blendShapesEditor = new BlendShapesEditor(this, this._target);
            this._modules.Add(this._blendShapesEditor);

            this._ikEditor = new IKEditor(this, this._target);
            this._modules.Add(this._ikEditor);

            if (this._collidersEditor._isLoneCollider)
            {
                this._currentModule = this._collidersEditor;
            }
            else
            {
                this._currentModule = this._bonesEditor;
            }
            this._currentModule.isEnabled = true;

            onParentage += this.OnParentage;
        }