public override void OnEnter()
        {
            base.OnEnter();

            float x, y;

            CCSize size = CCDirector.SharedDirector.WinSize;

            x = size.Width;
            y = size.Height;

            CCNode blue  = new CCLayerColor(new CCColor4B(0, 0, 255, 255));
            CCNode red   = new CCLayerColor(new CCColor4B(255, 0, 0, 255));
            CCNode green = new CCLayerColor(new CCColor4B(0, 255, 0, 255));
            CCNode white = new CCLayerColor(new CCColor4B(255, 255, 255, 255));

            blue.Scale    = (0.5f);
            blue.Position = (new CCPoint(-x / 4, -y / 4));
            blue.AddChild(SpriteLayer.node());

            red.Scale    = (0.5f);
            red.Position = (new CCPoint(x / 4, -y / 4));

            green.Scale    = (0.5f);
            green.Position = (new CCPoint(-x / 4, y / 4));
            green.AddChild(TestLayer.node());

            white.Scale    = (0.5f);
            white.Position = (new CCPoint(x / 4, y / 4));

            AddChild(blue, -1);
            AddChild(white);
            AddChild(green);
            AddChild(red);

            CCAction rot = new CCRotateBy(8, 720);

            blue.RunAction(rot);
            red.RunAction((CCAction)(rot.Copy()));
            green.RunAction((CCAction)(rot.Copy()));
            white.RunAction((CCAction)(rot.Copy()));
        }
Exemplo n.º 2
0
        public override void onEnter()
        {
            base.onEnter();

            float x, y;

            CCSize size = CCDirector.sharedDirector().getWinSize();

            x = size.width;
            y = size.height;

            CCNode blue  = CCLayerColor.layerWithColor(new ccColor4B(0, 0, 255, 255));
            CCNode red   = CCLayerColor.layerWithColor(new ccColor4B(255, 0, 0, 255));
            CCNode green = CCLayerColor.layerWithColor(new ccColor4B(0, 255, 0, 255));
            CCNode white = CCLayerColor.layerWithColor(new ccColor4B(255, 255, 255, 255));

            blue.scale    = (0.5f);
            blue.position = (new CCPoint(-x / 4, -y / 4));
            blue.addChild(SpriteLayer.node());

            red.scale    = (0.5f);
            red.position = (new CCPoint(x / 4, -y / 4));

            green.scale    = (0.5f);
            green.position = (new CCPoint(-x / 4, y / 4));
            green.addChild(TestLayer.node());

            white.scale    = (0.5f);
            white.position = (new CCPoint(x / 4, y / 4));

            addChild(blue, -1);
            addChild(white);
            addChild(green);
            addChild(red);

            CCAction rot = CCRotateBy.actionWithDuration(8, 720);

            blue.runAction(rot);
            red.runAction((CCAction)(rot.copy()));
            green.runAction((CCAction)(rot.copy()));
            white.runAction((CCAction)(rot.copy()));
        }
Exemplo n.º 3
0
 public static new TestLayer node()
 {
     TestLayer pNode = new TestLayer();
     return pNode;
 }
Exemplo n.º 4
0
        public static new TestLayer node()
        {
            TestLayer node = new TestLayer();

            return(node);
        }