private void Start() { thisTrackedImage = transform.parent.GetComponent <TrackedImage>(); mainTracker = transform.parent.parent.GetChild(0).GetChild(0).GetComponent <TrackerBase>(); if (transform.GetChild(1).GetComponent <Text>()) { transform.GetChild(1).GetComponent <Text>().text = ""; } birthTime = Time.time; }
public void IsMatch() { var context = CreateContext(); TrackerBase <InvocationContext> .Condition trueCondition = _ => true; TrackerBase <InvocationContext> .Condition falseCondition = _ => false; BuilderPatternDescriptor <InvocationExpressionSyntax> descriptor; descriptor = new BuilderPatternDescriptor <InvocationExpressionSyntax>(true); descriptor.IsMatch(context).Should().BeTrue(); descriptor = new BuilderPatternDescriptor <InvocationExpressionSyntax>(true, trueCondition); descriptor.IsMatch(context).Should().BeTrue(); descriptor = new BuilderPatternDescriptor <InvocationExpressionSyntax>(true, trueCondition, trueCondition); descriptor.IsMatch(context).Should().BeTrue(); descriptor = new BuilderPatternDescriptor <InvocationExpressionSyntax>(true, falseCondition); descriptor.IsMatch(context).Should().BeFalse(); descriptor = new BuilderPatternDescriptor <InvocationExpressionSyntax>(true, trueCondition, falseCondition); descriptor.IsMatch(context).Should().BeFalse(); }
private void Start() { thisTrackedImage = transform.parent.GetComponent <TrackedImage>(); mainTracker = GetComponent <TrackerBase>(); }