protected virtual void initWithArray(List<CCMenuItem> arrayOfItems){
this.touchPriority = kCCMenuHandlerPriority;
this.touchMode = kCCTouchesMode.OneByOne;
this.isTouchEnabled = true;
_enabled = true;
// by default, menu in the center of the screen
Vector2 s = CCDirector.sharedDirector.winSize;
this.ignoreAnchorPointForPosition = true;
_anchorPoint = new Vector2(0.5f, 0.5f);
this.contentSize = s;
this.position = s / 2;
int z=0;
if(arrayOfItems!=null){
var enumerator = arrayOfItems.GetEnumerator();
while (enumerator.MoveNext()) {
CCMenuItem item = enumerator.Current;
addChild(item, z);
z++;
}
}
_selectedItem = null;
_state = kCCMenuState.Waiting;
// enable cascade color and opacity on menus
this.cascadeColorEnabled = true;
this.cascadeOpacityEnabled = true;
}
/*