public void CreateGroup(IEnumerable <IExpression> expressions, ILayouter layouter) { var parent = GetGroupParent(); parent.position = StartPoint; var layout = layouter.GetLayout(expressions.Count()); foreach (var expression in expressions) { var go = Instantiate(ExpressionPrefab, parent); go.name = string.Format("{0} = {1}", expression.ToString(), expression.Match()); go.transform.localPosition = layout.Dequeue(); go.transform.Find("Label").GetComponent <TextMeshPro>().text = expression.ToString(); go.GetComponent <EventTrigger>().triggers.Add(OnInterectionEnrty); _expressionsOnScene.Add(go, expression); } InAnimater.Animate(parent); }
private List <ITag> GetLayout() { return(layouter.GetLayout( styler.GetStyles(Arg.Any <IDictionary <string, int> >())) .ToList()); }