/// <summary> /// Initializes a new instance of the <see cref="MenuController" /> class. /// </summary> /// <param name="interactionController">The interaction controller.</param> /// <param name="textViewNavigator">The text view navigator.</param> public MenuController(IInteractionController interactionController, ITextViewNavigator textViewNavigator) { this.interactionController = interactionController; this.textViewNavigator = textViewNavigator; this.interactionController.KeyInputEvent.Register(this, this.OnInteractionControllerKeyInput); this.interactionController.TagInputEvent.Register(this, this.OnTagInput); }
/// <summary> /// Sets the properties of specified interaction controller. /// </summary> /// <param name="controller">The controller of interaction areas.</param> protected override void SetTransformerProperties(IInteractionController controller) { base.SetTransformerProperties(controller); if (controller is PointBasedAnnotationRectangularTransformer) { SetResizePointSettings(((PointBasedAnnotationRectangularTransformer)controller).ResizePoints); } else if (controller is PointBasedAnnotationPointTransformer) { PointBasedAnnotationPointTransformer pointTransformer = (PointBasedAnnotationPointTransformer)controller; if (pointTransformer != null) { if (!(pointTransformer.PolygonPointTemplate is TriangleAnnotationInteractionPoint)) { InteractionPolygonPoint point = (InteractionPolygonPoint)pointTransformer.PolygonPointTemplate.Clone(); SetPolygonPointSettings(point); pointTransformer.PolygonPointTemplate = point; pointTransformer.InteractionPointBackColor = PolygonPointBackgroundColor; pointTransformer.SelectedInteractionPointBackColor = SelectedPolygonPointBackgroundColor; } } } }
public Player(IInteractionController interactionController, Inventory inventory, IPlayerRepository playerRepository, IPlayerStatusController playerStatusController, IPlayerNoiseController playerNoiseController) { InteractionController = interactionController; PlayerStatusController = playerStatusController; PlayeNoiseController = playerNoiseController; Inventory = inventory; playerRepository.SetPlayer(this); }
/// <summary> /// Initializes a new instance of the <see cref="VolumeController" /> class. /// </summary> /// <param name="volumeService">The volume service.</param> /// <param name="interactionController">The interaction controller.</param> /// <param name="volumeControllerReporter">The volume controller reporter.</param> public VolumeController(IVolumeService volumeService, IInteractionController interactionController, IVolumeControllerReporter?volumeControllerReporter) { this.volumeService = volumeService; this.interactionController = interactionController; this.volumeControllerReporter = volumeControllerReporter; this.volumeControllerReporter?.SetSource(this); this.interactionController.KeyInputEvent.Register(this, this.OnInteractionControllerKeyInput); }
/// <summary> /// Sets the properties of interaction controller according to the properties of annotation. /// </summary> /// <param name="controller">The interaction controller.</param> protected override void SetInteractionControllerProperties(IInteractionController controller) { base.SetInteractionControllerProperties(controller); RectangularObjectTransformer rectangularTransformer = controller as RectangularObjectTransformer; if (rectangularTransformer != null) { rectangularTransformer.CanMove = Data.CanMove; rectangularTransformer.CanResize = Data.CanResize; rectangularTransformer.CanRotate = Data.CanRotate; return; } }
/// <summary> /// Initializes a new instance of the <see cref="PlayerController" /> class. /// </summary> /// <param name="interactionController">The input manager.</param> /// <param name="playerService">The player service.</param> /// <param name="playbackControls">The playback controls.</param> /// <param name="menuRequester">The menu requester.</param> /// <param name="playerControllerReporter">The player controller reporter.</param> public PlayerController( IInteractionController interactionController, IPlayerService playerService, IPlaybackControls playbackControls, IMenuRequester menuRequester, IPlayerControllerReporter?playerControllerReporter) { this.interactionController = interactionController; this.playerService = playerService; this.playbackControls = playbackControls; this.menuRequester = menuRequester; this.playerControllerReporter = playerControllerReporter; this.interactionController.KeyInputEvent.Register(this, this.OnInteractionControllerKeyInput); this.interactionController.TagInputEvent.Register(this.OnInteractionControllerTagDetected); this.playerControllerReporter?.SetSource(this); }
/// <summary> /// Returns an information about interaction controller. /// </summary> /// <param name="controller">The controller.</param> /// <returns> /// The information about interaction controller. /// </returns> private string GetInteractionControllerInfo(IInteractionController controller) { CompositeInteractionController compositeController = controller as CompositeInteractionController; if (compositeController != null) { StringBuilder sb = new StringBuilder(string.Format("CompositeInteractionController ({0}", GetInteractionControllerInfo(compositeController.Items[0]))); for (int i = 1; i < compositeController.Items.Count; i++) { sb.Append(string.Format(", {0}", GetInteractionControllerInfo(compositeController.Items[i]))); } sb.Append(")"); return(sb.ToString()); } object controllerObject = (object)controller; return(controllerObject.GetType().Name); }
void Start() { bodyMass = GetBodyMass(); drag = GetDrag(); angularDrag = GetAngularDrag(); normalSpeed = GetNormalSpeed(); runSpeedMax = GetRunSpeedMax(); runSpeedIncrement = GetRunSpeedIncrement(); turnSpeed = GetTurnSpeed(); maxHP = GetMaxHP(); rigidBody = GetComponent <Rigidbody> (); if (rigidBody == null) { rigidBody = gameObject.AddComponent <Rigidbody> (); } rigidBody.mass = bodyMass; rigidBody.drag = drag; rigidBody.angularDrag = angularDrag; rigidBody.freezeRotation = true; rigidBody.isKinematic = false; healthController = GetComponent <IHealthController> (); if (healthController == null) { healthController = new NullHealthController(); } jumpController = GetComponent <IJumpController> (); if (jumpController == null) { jumpController = new NullJumpAttributes(); } interactionController = GetComponent <IInteractionController> (); if (interactionController == null) { interactionController = new NullInteractionController(); } timeManipulatableController = GetComponent <ITimeManipulatableController> (); if (timeManipulatableController == null) { timeManipulatableController = new NullTimeManipulatableController(); } combatController = GetComponent <ICombatController> (); if (combatController == null) { combatController = new NullCombatController(); } timePauseProjectileAttackController = GetComponent <TimePauseProjectileAttackController> (); if (timePauseProjectileAttackController == null) { timePauseProjectileAttackController = new NullProjectileAttackController(); } timeSlowProjectileAttackController = GetComponent <TimeSlowProjectileAttackController> (); if (timeSlowProjectileAttackController == null) { timeSlowProjectileAttackController = new NullProjectileAttackController(); } }
public InteraccionesController() { blHandler = WebApiConfig.FrontService(null); interactionHandler = WebApiConfig.InteractionService(null); }
private void Start() { _interactionController = RepositoryProvider.Player().GetPlayer().InteractionController; _interactionController.OnInteractuableChanged += InteractionChanged; }