コード例 #1
0
ファイル: ScrollButtonTest.cs プロジェクト: fafase/LCMusic
 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);
 }
コード例 #2
0
ファイル: ScrollRectSnap.cs プロジェクト: fafase/LCMusic
 public ScrollRectContainer(IScrollRectSnap scrollRectSnap)
 {
     this.scrollRectSnap = scrollRectSnap;
     this.btnDistance    = GetDistance();
     this.realDistance   = GetRealDistance();
 }
コード例 #3
0
 public void Init(IScrollRectSnap scrollRectSnap)
 {
     this.rt             = this.gameObject.GetComponent <RectTransform>();
     this.scrollBtn      = new ScrollButtonContainer(this as IScrollButton);
     this.scrollRectSnap = scrollRectSnap;
 }