• 大小: 49.06MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-30
  • 语言: 其他
  • 标签: H5卡五星  

资源简介

至尊卡五星房卡麻将,内容包含代理系统在内的全部客户端和服务端源码,支持安卓、苹果,微信登陆、微信分享、幸运大转盘等。地区分别有襄阳、随州、十堰和孝感玩法。游戏还有邀请人推荐码和礼券兑换等、功能丰富,还可以继续实现二次开发!

资源截图

代码片段和文件信息

#!python
import ossys
from xml.etree import ElementTree
from PIL import Image

def tree_to_dict(tree):
    d = {}
    for index item in enumerate(tree):
        if item.tag == ‘key‘:
            if tree[index+1].tag == ‘string‘:
                d[item.text] = tree[index + 1].text
            elif tree[index + 1].tag == ‘true‘:
                d[item.text] = True
            elif tree[index + 1].tag == ‘false‘:
                d[item.text] = False
            elif tree[index+1].tag == ‘dict‘:
                d[item.text] = tree_to_dict(tree[index+1])
    return d

def gen_png_from_plist(plist_filename png_filename):
    file_path = plist_filename.replace(‘.plist‘ ‘‘)
    big_image = Image.open(png_filename)
    root = ElementTree.fromstring(open(plist_filename ‘r‘).read())
    plist_dict = tree_to_dict(root[0])
    to_list = lambda x: x.replace(‘{‘‘‘).replace(‘}‘‘‘).split(‘‘)
    for kv in plist_dict[‘frames‘].items():
        rectlist = to_list(v[‘frame‘])
        width = int( rectlist[3] if v[‘rotated‘] else rectlist[2] )
        height = int( rectlist[2] if v[‘rotated‘] else rectlist[3] )
        box=( 
            int(rectlist[0])
            int(rectlist[1])
            int(rectlist[0]) + width
            int(rectlist[1]) + height
            )
        sizelist = [ int(x) for x in to_list(v[‘sourceSize‘])]
        rect_on_big = big_image.crop(box)

        if v[‘rotated‘]:
            rect_on_big = rect_on_big.rotate(90)

        result_image = Image.new(‘RGBA‘ sizelist (0000))
        if v[‘rotated‘]:
            result_box=(
                ( sizelist[0] - height )/2
                ( sizelist[1] - width )/2
                ( sizelist[0] + height )/2
                ( sizelist[1] + width )/2
                )
        else:
            result_box=(
                ( sizelist[0] - width )/2
                ( sizelist[1] - height )/2
                ( sizelist[0] + width )/2
                ( sizelist[1] + height )/2
                )
        result_image.paste(rect_on_big result_box mask=0)

        if not os.path.isdir(file_path):
            os.mkdir(file_path)
        outfile = (file_path+‘/‘ + k).replace(‘gift_‘ ‘‘)
        print outfile “generated“
        result_image.save(outfile)

if __name__ == ‘__main__‘:
    filename = sys.argv[1]
    plist_filename = filename + ‘.plist‘
    png_filename = filename + ‘.png‘
    if (os.path.exists(plist_filename) and os.path.exists(png_filename)):
        gen_png_from_plist( plist_filename png_filename )
    else:
        print “make sure you have boith plist and png files in the same directory“

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    .......      1594  2017-06-01 21:36  client\assets\anims\angry.anim

     文件         88  2017-06-08 21:58  client\assets\anims\angry.anim.meta

    .......       870  2017-06-01 21:36  client\assets\anims\dingque_tuijian.anim

     文件         88  2017-06-08 21:58  client\assets\anims\dingque_tuijian.anim.meta

    .......       939  2017-06-01 21:36  client\assets\anims\fennu.anim

     文件         88  2017-06-08 21:58  client\assets\anims\fennu.anim.meta

    .......      1601  2017-06-01 21:36  client\assets\anims\guafeng.anim

     文件         88  2017-06-08 21:58  client\assets\anims\guafeng.anim.meta

    .......       616  2017-06-01 21:36  client\assets\anims\han.anim

     文件         88  2017-06-08 21:58  client\assets\anims\han.anim.meta

    .......       618  2017-06-01 21:36  client\assets\anims\happy.anim

     文件         88  2017-06-08 21:58  client\assets\anims\happy.anim.meta

    .......      1597  2017-06-01 21:36  client\assets\anims\huaixiao.anim

     文件         88  2017-06-08 21:58  client\assets\anims\huaixiao.anim.meta

    .......      1258  2017-06-01 21:36  client\assets\anims\jiong.anim

     文件         88  2017-06-08 21:58  client\assets\anims\jiong.anim.meta

    .......      2402  2017-06-01 21:36  client\assets\anims\lihai.anim

     文件         88  2017-06-08 21:58  client\assets\anims\lihai.anim.meta

    .......      3757  2017-06-01 21:36  client\assets\anims\maima.anim

     文件         88  2017-06-08 21:58  client\assets\anims\maima.anim.meta

    .......      2802  2017-06-01 21:36  client\assets\anims\play_gang.anim

     文件         88  2017-06-08 21:58  client\assets\anims\play_gang.anim.meta

    .......      2630  2017-06-01 21:36  client\assets\anims\play_guafeng.anim

     文件         88  2017-06-08 21:58  client\assets\anims\play_guafeng.anim.meta

    .......      2812  2017-06-01 21:36  client\assets\anims\play_hu.anim

     文件         88  2017-06-08 21:58  client\assets\anims\play_hu.anim.meta

    .......      2802  2017-06-01 21:36  client\assets\anims\play_peng.anim

     文件         88  2017-06-08 21:58  client\assets\anims\play_peng.anim.meta

    .......       138  2017-06-01 21:36  client\assets\anims\play_pengpenghu.anim

     文件         88  2017-06-08 21:58  client\assets\anims\play_pengpenghu.anim.meta

............此处省略6676个文件信息

评论

共有 条评论

相关资源