示例#1
0
        public override void OnEnter()
        {
            base.OnEnter(); CCSize windowSize = Layer.VisibleBoundsWorldspace.Size;

            float step = windowSize.Width / 4;

            int i = 0;

            foreach (CCNode node in batch.Children)
            {
                CCSprite sprite = (CCSprite)node;
                sprite.Position = (new CCPoint((i + 1) * step, windowSize.Height / 2));
                sprite.RunAction(action);
                ++i;
            }

            batch.IgnoreAnchorPointForPosition = true;
            batch.AnchorPoint = new CCPoint(0.5f, 0.5f);
            batch.ContentSize = (new CCSize(windowSize.Width, windowSize.Height));

            batch.RepeatForever(scale, scale_back);
            batch.RepeatForever(rotate, rotate_back);
        }