Exemple #1
0
 public void SetTest()
 {
     this.scrollRectSnap = Substitute.For <IScrollRectSnap>();
     this.btn            = Substitute.For <IScrollButton>();
     this.btn.Init(scrollRectSnap);
     this.btn.ScrollRectSnapInstance.MinSize.Returns(0.5f);
     this.container = new ScrollButtonContainer(this.btn);
 }
Exemple #2
0
 public void Init(IScrollRectSnap scrollRectSnap)
 {
     this.rt             = this.gameObject.GetComponent <RectTransform>();
     this.scrollBtn      = new ScrollButtonContainer(this as IScrollButton);
     this.scrollRectSnap = scrollRectSnap;
 }