Example #1
0
        public TMXUncompressedTest()
        {
            CCLayerColor color = new CCLayerColor(new CCColor4B(64, 64, 64, 255));
            AddChild(color, -1);

            CCTMXTiledMap map = new CCTMXTiledMap("TileMaps/iso-test2-uncompressed");
            AddChild(map, 0, kTagTileMap);

            CCSize s = map.ContentSize;

            // move map to the center of the screen
            CCSize ms = map.MapSize;
            CCSize ts = map.TileSize;
            map.RunAction(new CCMoveTo (1.0f, new CCPoint(-ms.Width * ts.Width / 2, -ms.Height * ts.Height / 2)));

            /*
            // testing release map
            CCArray* pChildrenArray = map.getChildren();
            CCTMXLayer layer;
            object* pObject = NULL;
            CCARRAY_FOREACH(pChildrenArray, pObject)
            {
                layer = (CCTMXLayer) pObject;

                if (!layer)
                    break;

                layer.releaseMap();
            }
            */
        }
Example #2
0
        public TMXIsoTest2()
        {
            CCLayerColor color = new CCLayerColor(new CCColor4B(64, 64, 64, 255));
            AddChild(color, -1);

            CCTMXTiledMap map = new CCTMXTiledMap("TileMaps/iso-test22");
            AddChild(map, 0, kTagTileMap);

            CCSize s = map.ContentSize;

            // move map to the center of the screen
            CCSize ms = map.MapSize;
            CCSize ts = map.TileSize;
            map.RunAction(new CCMoveTo (1.0f, new CCPoint(-ms.Width * ts.Width / 2, -ms.Height * ts.Height / 2)));
        }
Example #3
0
        public TMXOrthoFromXMLTest()
        {
            CCTMXTiledMap map = new CCTMXTiledMap("TileMaps/orthogonal-test1");
            AddChild(map, 0, kTagTileMap);

            /*
            object* pObj = NULL;
            CCARRAY_FOREACH(map.getChildren(), pObj)
            {
                CCSpriteBatchNode* child = (CCSpriteBatchNode*) pObj;
                child.Texture.setAntiAliasTexParameters();
            }
            */

            CCScaleBy action = new CCScaleBy(2, 0.5f);
            map.RunAction(action);
        }
Example #4
0
        public TMXOrthoTest2()
        {
            CCTMXTiledMap map = new CCTMXTiledMap("TileMaps/orthogonal-test1");
            AddChild(map, 0, kTagTileMap);

            /*
            CCArray* pChildrenArray = map.getChildren();
            CCSpriteBatchNode* child = NULL;
            object* pObject = NULL;
            CCARRAY_FOREACH(pChildrenArray, pObject)
            {
                child = (CCSpriteBatchNode*) pObject;

                if (!child)
                    break;

                child.Texture.setAntiAliasTexParameters();
            }
            */

            map.RunAction(new CCScaleBy(2, 0.5f));
        }
Example #5
0
        public TMXOrthoFlipRunTimeTest()
        {
            CCTMXTiledMap map = new CCTMXTiledMap("TileMaps/ortho-rotation-test");
            AddChild(map, 0, kTagTileMap);

            /*
            object* pObj = NULL;
            CCARRAY_FOREACH(map.getChildren(), pObj)
            {
                CCSpriteBatchNode* child = (CCSpriteBatchNode*) pObj;
                child.Texture.setAntiAliasTexParameters();
            }
            */

            CCScaleBy action = new CCScaleBy(2, 0.5f);
            map.RunAction(action);

            Schedule(flipIt, 1.0f);
        }