public MovementDialog(MusclePositionController musclePositionController, PoseController poseController, MedicalController medicalController) : base("Medical.Movement.GUI.MovementDialog.layout") { this.medicalController = medicalController; this.musclePositionController = musclePositionController; this.poseController = poseController; poseController.PoseModeActivated += poseController_PoseModeActivated; poseController.PoseModeDeactivated += poseController_PoseModeDeactivated; musclePositionController.OnUndoRedoChanged += musclePositionController_UndoRedoStateAltered; musclePositionController.OnRedo += musclePositionController_UndoRedoStateAltered; musclePositionController.OnUndo += musclePositionController_UndoRedoStateAltered; controlButtonPanel = window.findWidget("ControlButtonPanel"); foreach (Widget widget in controlButtonPanel.Children) { Button button = widget as Button; if (button != null) { button.MouseButtonClick += widget_MouseButtonClick; } } undoButton = window.findWidget("Undo") as Button; undoButton.MouseButtonClick += undoButton_MouseButtonClick; redoButton = window.findWidget("Redo") as Button; redoButton.MouseButtonClick += redoButton_MouseButtonClick; Button resetButton = (Button)window.findWidget("Reset"); resetButton.MouseButtonClick += resetButton_MouseButtonClick; musclePositionController_UndoRedoStateAltered(musclePositionController); }
public static T GetPrivate <T>(PoseController obj, string name) { var type = obj.GetType(); var typefield = type.GetField(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy); return((T)typefield.GetValue(obj)); }
void Start() { rb = new Rigidbody[transform.childCount]; rb = gameObject.GetComponentsInChildren <Rigidbody>(); ictrl = GetComponent <IceBreakMaterialController>(); ctrl = GameObject.Find("GameStateController").GetComponent <GameStateController>(); poseCtrl = GameObject.Find("Pose").GetComponent <PoseController>(); taerumoto = taeru; }
void poseController_PoseModeActivated(PoseController poseController, string mode) { Button button = controlButtonPanel.findWidget(mode) as Button; if (button != null) { button.Selected = true; } }
void Start() { ctrl = GameObject.Find("GameStateController").GetComponent <GameStateController>(); sEnd = GameObject.FindGameObjectWithTag("Goal").GetComponent <StageEndJudge>(); dnChanger = GameObject.Find("DayNightChanger").GetComponent <DayNightChanger>(); cc = GameObject.Find("Main Camera").GetComponent <CameraController>(); poseCtrl = GameObject.Find("Pose").GetComponent <PoseController>(); waterHeight = startHegiht; }
private void Start() { pManager = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerInputManager>(); ddn = GetComponent <DisplayDayNight>(); dnLight = GetComponent <DayNightLighting>(); fwm = GameObject.Find("FlowingWaterManager").GetComponent <FlowingWaterManager>(); poseCtrl = GameObject.Find("Pose").GetComponent <PoseController>(); cc = GameObject.Find("Main Camera").GetComponent <CameraController>(); Fade.OnEndFade += ChangeDayNight; isDay = isDayTime; ddn.ChangeSky(isDay); sEnd = GameObject.FindGameObjectWithTag("Goal").GetComponent <StageEndJudge>(); }
void Awake() { this.HandControllerObject = GameObject.FindWithTag("LeapController"); this.HandControllerReference = this.HandControllerObject.GetComponent <ExperimentHandController>(); GameObject rangeCheckContainer = GameObject.FindGameObjectWithTag("RangeCheck"); this.RangeCheck = rangeCheckContainer.GetComponent <EffectorRangeCheck>(); this.RangeCheck.ObjectLeftBounds += this.rangeCheckHandler; GameObject posecontrollerContainer = GameObject.FindGameObjectWithTag("PoseController"); this.HandPoseController = posecontrollerContainer.GetComponent <PoseController>(); // register container controller GameObject container = GameObject.FindGameObjectWithTag("Container"); if (container != null) { ContainerController containerController = container.GetComponent <ContainerController>(); if (containerController != null) { //containerController.ObjectWasReleased += new ContainerController.ObjectWasReleasedHandler(this.checkTargetPosition); containerController.ObjectWasReleased += this.checkTargetPosition; containerController.ObjectWasDestroyed += this.checkTargetDestruction; } } this.Target.SetActive(true); this.Target.transform.position = new Vector3(0, -100, 100); this.Target.GetComponent <Rigidbody>().isKinematic = true; this.FixationObject = GameObject.FindGameObjectWithTag("FixationObject"); this.TrialUpdateDelegate = delegate() { this.TrialUpdate(); }; //setup trial control this.CurrentTrialState = new TrainingStateObject(); this.CurrentTrialState.TrialState = TrainingStates.STARTUP; // register listeners SliderFocusHandler.SliderEvent += this.handleSlider; CheckMarkFocusHandler.ToggleEvent += this.handleToggle; if (GraspTrainingController.Verbose) { UnityEngine.Debug.Log("done with awaking..."); } this.OffsetController.ApplyDrift = false; this.TrainingUI.SetActive(false); }
public void initialize(StandaloneController standaloneController) { poseController = new PoseController(standaloneController); GUIManager guiManager = standaloneController.GUIManager; var resources = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceNames(); movementDialog = new MovementDialog(standaloneController.MusclePositionController, poseController, standaloneController.MedicalController); guiManager.addManagedDialog(movementDialog); var taskController = standaloneController.TaskController; var movementDialogTask = new PinableMDIDialogOpenTask(movementDialog, "Medical.Movement.MovementDialogTask", "Movement", CommonResources.NoIcon, TaskMenuCategories.Explore); taskController.addTask(movementDialogTask); }
void Start() { startPos = transform.position; rb = GetComponent <Rigidbody>(); pTest = GetComponent <PlayerInputTest>(); gameCtrl = GameObject.Find("GameStateController").GetComponent <GameStateController>(); sEnd = GameObject.FindGameObjectWithTag("Goal").GetComponent <StageEndJudge>(); pManager = GetComponent <PlayerInputManager>(); whc = GameObject.Find("WaterHeightController").GetComponent <WaterHeightController>(); pac = GetComponent <PlayerAnimationController>(); poseCtrl = GameObject.Find("Pose").GetComponent <PoseController>(); cc = GameObject.Find("Main Camera").GetComponent <CameraController>(); anim = GetComponent <Animator>(); pc = GameObject.Find("PenguinController").GetComponent <PenguinController>(); }
void Start() { rb = new Rigidbody[transform.childCount - 1]; rb = gameObject.GetComponentsInChildren <Rigidbody>(); mc = new MeshCollider[transform.childCount - 1]; mc = gameObject.GetComponentsInChildren <MeshCollider>(); ictrl = GetComponent <IceBreakMaterialController>(); ctrl = GameObject.Find("GameStateController").GetComponent <GameStateController>(); poseCtrl = GameObject.Find("Pose").GetComponent <PoseController>(); particle = transform.Find("BreakEffect").GetComponent <ParticleSystem>(); for (int i = 0; i < transform.childCount - 1; i++) { mc[i].enabled = false; } tr = transform; num = 0; }
void Awake() { this.HandControllerObject = GameObject.FindWithTag("LeapController"); this.HandControllerReference = this.HandControllerObject.GetComponent <ExperimentHandController>(); if (!this.VibroTactileStimulation) { this.HandControllerReference.enableFingerParticleSystems = true; } GameObject posecontrollerContainer = GameObject.FindGameObjectWithTag("PoseController"); this.HandPoseController = posecontrollerContainer.GetComponent <PoseController>(); this.Target.SetActive(true); this.Target.transform.position = new Vector3(0, -100, 100); this.Target.GetComponent <Rigidbody>().isKinematic = true; this.leftLight = GameObject.FindGameObjectWithTag("LeftLightStimulus"); this.rightLight = GameObject.FindGameObjectWithTag("RightLightStimulus"); this.leftLight.GetComponent <ParticleSystem>().Stop(); this.leftLight.GetComponent <ParticleSystem>().Clear(); this.rightLight.GetComponent <ParticleSystem>().Stop(); this.rightLight.GetComponent <ParticleSystem>().Clear(); this.messageObtained = false; //utils this.FixationObject = GameObject.FindGameObjectWithTag("FixationObject"); this.TrialUpdateDelegate = delegate() { this.TrialUpdate(); }; //setup trial control this.CurrentTrialState = new TrainingStateObject(); this.CurrentTrialState.TrialState = TrainingStates.STARTUP; this.LastErrorCode = "none"; // instruction this.FeedbackDisplay.text = ""; if (SpeechTrainingController.Verbose) { UnityEngine.Debug.Log("done with awaking..."); } }
/// <summary> /// モデルを更新する。 /// モーション、ポーズなども更新される。 /// </summary> /// <param name="elapsed_seconds">前回の更新時刻からの経過時間[秒]</param> public void Update(double elapsed_seconds) { if (elapsed_seconds < 0.0) { throw new ArgumentException(); } // モーションを更新する // ベースモーションの更新後は、次の更新のために表情やエフェクトの影響を受ける前のパラメータを保存しておく Model.RestoreSavedParameters(); BaseMotionManager.Update(elapsed_seconds); Model.SaveParameters(); ExpressionMotionManager.Update(elapsed_seconds); EffectMotionManager.Update(elapsed_seconds); if (PoseController != null) { PoseController.UpdateParameters(elapsed_seconds); } Model.Update(); }
void Awake() { GameObject rangeCheckContainer = GameObject.FindGameObjectWithTag("RangeCheck"); this.RangeCheck = rangeCheckContainer.GetComponent <EffectorRangeCheck>(); this.RangeCheck.ObjectLeftBounds += this.rangeCheckHandler; GameObject posecontrollerContainer = GameObject.FindGameObjectWithTag("PoseController"); this.HandPoseController = posecontrollerContainer.GetComponent <PoseController>(); // register container controller GameObject container = GameObject.FindGameObjectWithTag("Container"); if (container != null) { ContainerController containerController = container.GetComponent <ContainerController>(); if (containerController != null) { containerController.ObjectWasReleased += this.checkTargetPosition; containerController.ObjectWasDestroyed += this.checkTargetDestruction; } } this.Target.SetActive(true); this.Target.transform.position = new Vector3(0, -100, 100); this.Target.GetComponent <Rigidbody>().isKinematic = true; this.InteractionStateUpdateDelegate = delegate() { this.InteractionStateUpdate(); }; //setup interaction control this.CurrentInteractionState = new InteractionStateObject(); this.CurrentInteractionState.InteractionStage = InteractionStage.STARTUP; if (GraspStateController.Verbose) { UnityEngine.Debug.Log("done with awaking..."); } }
protected AdvancedModeModule(PoseController parent) { this._parent = parent; this._parent.onDestroy += this.OnDestroy; }
protected void Init() { controller = GameObject.Find("WaterHeightController").GetComponent <WaterHeightController>(); position = transform.position; poseCtrl = GameObject.Find("Pose").GetComponent <PoseController>(); }
private void Start() { pc = GameObject.Find("Pose").GetComponent <PoseController>(); }