public void ToHtml_Other_ShouldReturnCorrectValue(int r, int g, int b, string expected) { // arrange var color = Color.FromArgb(r, g, b); // act var actual = HighlightTarget.ToHtml(color); // assert Assert.Equal(expected, actual); }
public void HighlighTargets_ShouldDecorateActor( [Modest] Actor actor, [Modest] HighlightTarget expected) { //arrange //act var actual = ActorExtensions.HighlightTargets(actor).InnerActorBuilder(expected.Actor); //assert actual.Should().BeOfType <HighlightTarget>().Which.Should().BeEquivalentTo(expected); }
private void OnTriggerExit(Collider other) { if (_target != null && other.gameObject == _target.gameObject) { logger.LogFormat(LogType.Log, "{0} target exit: {1}", LogTag, _target.name); SetHighlightTarget(_target, false); _target = null; capsuleCollider.radius = 3f; HUDController.gInstance.SetActionHint(false); } }
public static void SetHighlightTarget(HighlightTarget ht, bool on) { Outline o = ht.transform.GetComponentInChildren <Outline>(); if (o == null) { o = ht.transform.parent.GetComponentInChildren <Outline>(); } if (o != null) { o.enabled = on; } }
private void OnTriggerEnter(Collider other) { HighlightTarget newTarget = other.GetComponent <HighlightTarget>(); if (newTarget != null) { logger.LogFormat(LogType.Log, "{0} new target entered: {1}", LogTag, newTarget.name); if (_target == null) { _target = newTarget; SetHighlightTarget(_target, true); HUDController.gInstance.SetActionHint(true); } else if (target.priority < newTarget.priority) { SetHighlightTarget(_target, false); _target = newTarget; SetHighlightTarget(_target, true); HUDController.gInstance.SetActionHint(true); } capsuleCollider.radius = 5f; } }