Skip to content
No description or website provided.
C C++ Objective-C JavaScript Lua Java Other
Latest commit 0518643 Feb 11, 2014 @Ivenyang Ivenyang Update README.md
Failed to load latest commit information.
CocosDenshion init project for kapai starter kit Aug 28, 2013
cocos2dx add login register Aug 29, 2013
document init project for kapai starter kit Aug 28, 2013
extensions in case of websocket server down, open connect will false. send a err… Sep 16, 2013
external library for x86 Oct 10, 2013
licenses init project for kapai starter kit Aug 28, 2013
plugin init project for kapai starter kit Aug 28, 2013
projects/CardGame update android project Oct 10, 2013
samples init project for kapai starter kit Aug 28, 2013
scripting init project for kapai starter kit Aug 28, 2013
template init project for kapai starter kit Aug 28, 2013
tools init project for kapai starter kit Aug 28, 2013
AUTHORS init project for kapai starter kit Aug 28, 2013
CHANGELOG init project for kapai starter kit Aug 28, 2013
Emscripten.TODO init project for kapai starter kit Aug 28, 2013
Makefile init project for kapai starter kit Aug 28, 2013
Makefile.emscripten init project for kapai starter kit Aug 28, 2013
README.md Update README.md Feb 11, 2014
build-nacl.sh init project for kapai starter kit Aug 28, 2013
build-win32.bat init project for kapai starter kit Aug 28, 2013
catanddog.png 提交说明文件和宣传图。 Feb 11, 2014
cocos2d-win32.vc2010.sln init project for kapai starter kit Aug 28, 2013
cocos2d-win32.vc2012.sln init project for kapai starter kit Aug 28, 2013
create-android-project.bat init project for kapai starter kit Aug 28, 2013
create-android-project.sh init project for kapai starter kit Aug 28, 2013
install-deps-linux.sh init project for kapai starter kit Aug 28, 2013
install-templates-xcode.sh init project for kapai starter kit Aug 28, 2013
make-all-linux-project.sh init project for kapai starter kit Aug 28, 2013
weixin.jpeg 提交说明文件和宣传图。 Feb 11, 2014

README.md

Starter Kit 猫狗大战 卡牌客户端

更多源码

泰然源码

加入我们

泰然教程组

宣传画

bg

视频地址

优酷视频

Cocos2d-x版本

基于:Cocos2d-x 2.1.5

语言:JS(JSB)

作者:u0u0(刘克男),一叶(刘雪锋),Iven(杨雍)

目录结构

客户端工程目录

projects/CardGame

测试包下载

客户端测试包下载(ipa+apk):

微信收听" 泰然网 "微信公众账号,回复“猫狗大战”即可获取下载地址。

泰然公众账号二维码:

iTyran

服务器下载

属性

语言:Golang

网络:websocket

作者:u0u0(刘克男)

下载地址:

Server下载

接口示例

Login module

Register

{
    "Command" : "CM_REGISTER",
        "Param":
        {
            "Username" : "xxx",
            "Password" : "aa",
            "Email" : "a@x.com"
        }
}

{
    "Command" : "CM_REGISTER",
        "Return" :
        {
            "Code" : 0,
            "Message" : "CreateCharacter"
        }
}

Login

{
    "Command" : "CM_LOGIN",
        "Param" :
        {
            "Username" : "xxx",
            "Password" : "aa"
        }
}

{
    "Command" : "CM_LOGIN",
        "Return" :
        {
            "Code" : 0,
            "Message" : "Success" // or "CreateCharacter"
        }
}

Create character (LOGIN FIRST)

{
    "Command" : "CM_CHAR_CREATE",
        "Param" :
        {
            "CharName" : "xxx",
        }
}

{
    "Command" : "CM_CHAR_CREATE",
        "Return" :
        {
            "Code" : 0,
            "Message" : {json of char info}
        }
}

Get character (LOGIN FIRST)

{
    "Command" : "CM_CHAR_GET",
        "Param" : ""
}

{
    "Command" : "CM_CHAR_GET",
        "Return" :
        {
            "Code" : 0,
            "Message" : {json of char info}
        }
}

json of char info

{
    "CharName": "a New Name ",
    "Level" : 1,
    "Vitality": 60,
    "Scene": 1,
    "Stage" : 1
}

Get card array

{
    "Command" : "CM_CARDS_GET",
        "Param" : ""
}

{
    "Command" : "CM_CARDS_GET",
        "Return" :
        {
            "Code" : 0,
            "Message" : {json of card array}
        }
}

json of card array

[
{
    "Name": "小花猫",
    "HP": 21,
    "Attack": 27,
    "Defence": 13,
    "Speed": 120,
    "Talent": 720,
    "Drop": 50,
    "Experience": 324,
    "Skill": [1,2],
    "ID": "002",
    "Level": 1,
    "Status": 1,
    "Hash": "0xc2000e9630",
}
]

Raid

{
    "Command" : "CM_RAID",
        "Param" : {
            "Scene" : 1,
            "Stage" : 1
        }
}

{
    "Command" : "CM_RAID",
        "Return" : 
        {
            "Code" : 0,
            "Message" : "{battle command order}"
        }
}
Something went wrong with that request. Please try again.