Example #1
0
        public TMXOrthoZorder()
        {
            CCTMXTiledMap map = new CCTMXTiledMap("TileMaps/orthogonal-test-zorder");
            AddChild(map, 0, kTagTileMap);

            CCSize s = map.ContentSize;

            m_tamara = new CCSprite(s_pPathSister1);
            map.AddChild(m_tamara, map.Children.Count);
            m_tamara.AnchorPoint = (new CCPoint(0.5f, 0));


            CCMoveBy move = new CCMoveBy (10, new CCPoint(400, 450));
            CCFiniteTimeAction back = move.Reverse();
            CCSequence seq = new CCSequence(move, back);
            m_tamara.RunAction(new CCRepeatForever (seq));

            Schedule(repositionSprite);
        }
Example #2
0
        public TMXIsoZorder()
        {
            CCTMXTiledMap map = new CCTMXTiledMap("TileMaps/iso-test-zorder");
            AddChild(map, 0, kTagTileMap);

            CCSize s = map.ContentSize;
            CCLog.Log("ContentSize: {0}, {1}", s.Width, s.Height);
            map.Position = new CCPoint(-s.Width / 2, 0);

            m_tamara = new CCSprite(s_pPathSister1);
            map.AddChild(m_tamara, map.Children.Count);
            float mapWidth = map.MapSize.Width * map.TileSize.Width;
            m_tamara.Position = new CCPoint(mapWidth / 2, 0).PixelsToPoints();
            m_tamara.AnchorPoint = (new CCPoint(0.5f, 0));


            CCMoveBy move = new CCMoveBy (10, new CCPoint(300, 250));
            CCFiniteTimeAction back = move.Reverse();
            CCSequence seq = new CCSequence(move, back);
            m_tamara.RunAction(new CCRepeatForever (seq));

            Schedule(repositionSprite);
        }