public void initWithLayers(List<CCLayer>layers, int widthOffset, int priority){
this.isTouchEnabled = true;
this.stealTouches = true;
this.touchPriority = priority;
// Set default minimum touch length to scroll.
this.minimumTouchLengthToSlide = 30.0f;
this.minimumTouchLengthToChangePage = 100.0f;
this.marginOffset = CCDirector.sharedDirector.winSize.x;
// Show indicator by default.
this.showPagesIndicator = true;
this.pagesIndicatorPosition = new Vector2(0.5f * this.contentSize.x, Mathf.Ceil ( this.contentSize.y / 8.0f ));
this.pagesIndicatorNormalColor = new Color32(0x96,0x96,0x96,0xFF);
this.pagesIndicatorSelectedColor = new Color32(0xFF,0xFF,0xFF,0xFF);
// Set up the starting variables
currentScreen_ = 0;
// Save offset.
this.pagesWidthOffset = widthOffset;
// Save array of layers.
layers_ = new List<CCLayer> (layers);
isMoving_ = false;
scrollTime_ = 0.3f;
this.updatePages();
}