1、清理仓库

This commit is contained in:
贝密游戏
2017-12-21 23:04:13 +08:00
parent eeb1c9e07b
commit b52d442381
1317 changed files with 138642 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
var beiMiCommon = require("BeiMiCommon");
cc.Class({
extends: beiMiCommon,
properties: {
// foo: {
// default: null, // The default value will be used only when the component attaching
// to a node for the first time
// url: cc.Texture2D, // optional, default is typeof default
// serializable: true, // optional, default is true
// visible: true, // optional, default is true
// displayName: 'Foo', // optional
// readonly: false, // optional, default is false
// },
// ...
},
// use this for initialization
onLoad: function () {
},
onClick:function(event){
event.stopPropagation();
},
onCloseClick:function(){
this.closeOpenWin();
}
// called every frame, uncomment this function to activate update callback
// update: function (dt) {
// },
});

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "a07b35cb-8b05-4193-9445-cc799de741b1",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,63 @@
// Learn cc.Class:
// - [Chinese] http://www.cocos.com/docs/creator/scripting/class.html
// - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/class/index.html
// Learn Attribute:
// - [Chinese] http://www.cocos.com/docs/creator/scripting/reference/attributes.html
// - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/reference/attributes/index.html
// Learn life-cycle callbacks:
// - [Chinese] http://www.cocos.com/docs/creator/scripting/life-cycle-callbacks.html
// - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/life-cycle-callbacks/index.html
cc.Class({
extends: cc.Component,
properties: {
// foo: {
// // ATTRIBUTES:
// default: null, // The default value will be used only when the component attaching
// // to a node for the first time
// type: cc.SpriteFrame, // optional, default is typeof default
// serializable: true, // optional, default is true
// },
// bar: {
// get () {
// return this._bar;
// },
// set (value) {
// this._bar = value;
// }
// },
title_feedback: {
default: null,
type: cc.Node
},
title_reply: {
default: null,
type: cc.Node
},
},
// LIFE-CYCLE CALLBACKS:
onLoad : function() {
this.title_feedback.active = true ;
this.title_reply.active = false ;
/**
* 从远程加载数据,如果加载数据失败,则显示提示消息,并注册拖动刷新事件
*/
},
onFeedBack:function(){
this.title_feedback.active = true ;
this.title_reply.active = false ;
},
onReply:function(){
this.title_feedback.active = false ;
this.title_reply.active = true ;
}
// update (dt) {},
});

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "789dc0da-871b-45a1-a1da-000c92f392b7",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,98 @@
var beiMiCommon = require("BeiMiCommon");
cc.Class({
extends: beiMiCommon,
properties: {
// foo: {
// // ATTRIBUTES:
// default: null, // The default value will be used only when the component attaching
// // to a node for the first time
// type: cc.SpriteFrame, // optional, default is typeof default
// serializable: true, // optional, default is true
// },
// bar: {
// get () {
// return this._bar;
// },
// set (value) {
// this._bar = value;
// }
// },
numdata: {
default:null,
type:cc.Node
}
},
// LIFE-CYCLE CALLBACKS:
onLoad : function () {
this.roomid = new Array() ;
},
onClick:function(event,data){
if(this.roomid.length < 6){
this.roomid.push(data);
this.disRoomId();
}
if(this.roomid.length == 6){
this.closeOpenWin();
/**
* 查询服务端的房间号码 然后通过房间号码找到对应的房间游戏类型,玩法等信息
*/
if(this.ready()){
let socket = this.socket();
/**
* 发送 room请求
*/
var param = {
token:cc.beimi.authorization,
roomid:this.roomid.join(""),
orgi:cc.beimi.user.orgi,
userid:cc.beimi.user.id
} ;
socket.emit("searchroom" , JSON.stringify(param));
this.registercallback(this.roomCallBack);
}
this.loadding();
}
},
roomCallBack:function(result , self){
var data = self.parse(result) ;
if(data.result == "ok"){
var extparams = {
gametype : data.code ,
playway : data.id ,
gamemodel : "room"
} ;
/**
* 发送创建房间开始游戏的请求
*/
self.preload(extparams , self) ;
}else if(data.result == "notexist"){
self.alert("房间号不存在。");
}else if(data.result == "full"){
self.alert("房间已满员。");
}
},
onDeleteClick:function(){
this.roomid.splice(this.roomid.length-1 , this.roomid.length) ;
this.disRoomId();
},
onCleanClick:function(){
this.roomid.splice(0 , this.roomid.length) ;
this.disRoomId();
},
disRoomId:function(){
let children = this.numdata.children ;
for(var inx = 0 ; inx < 6 ; inx ++){
if(inx < this.roomid.length){
children[inx].children[0].getComponent(cc.Label).string = this.roomid[inx] ;
}else{
children[inx].children[0].getComponent(cc.Label).string = "" ;
}
}
}
// update (dt) {},
});

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "dca01e44-3a44-43f1-be61-92135c017914",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,30 @@
var beiMiCommon = require("BeiMiCommon");
cc.Class({
extends: beiMiCommon,
properties: {
// foo: {
// default: null, // The default value will be used only when the component attaching
// to a node for the first time
// url: cc.Texture2D, // optional, default is typeof default
// serializable: true, // optional, default is true
// visible: true, // optional, default is true
// displayName: 'Foo', // optional
// readonly: false, // optional, default is false
// },
// ...
},
// use this for initialization
onLoad: function () {
},
onClick:function(){
this.logout();
this.scene("login", this) ;
}
// called every frame, uncomment this function to activate update callback
// update: function (dt) {
// },
});

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "c02c1c2a-7b42-45ae-b4a9-872d007a4eb6",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,72 @@
var beiMiCommon = require("BeiMiCommon");
cc.Class({
extends: beiMiCommon,
properties: {
// foo: {
// default: null, // The default value will be used only when the component attaching
// to a node for the first time
// url: cc.Texture2D, // optional, default is typeof default
// serializable: true, // optional, default is true
// visible: true, // optional, default is true
// displayName: 'Foo', // optional
// readonly: false, // optional, default is false
// },
// ...
setting: {
default: null,
type: cc.Prefab
},
message: {
default: null,
type: cc.Prefab
},
share: {
default: null,
type: cc.Prefab
},
playway: {
default: null,
type: cc.Prefab
},
feedback: {
default: null,
type: cc.Prefab
}
},
// use this for initialization
onLoad: function () {
},
onSettingClick:function(){
cc.beimi.openwin = cc.instantiate(this.setting) ;
cc.beimi.openwin.parent = this.root();
},
onMessageClick:function(){
cc.beimi.openwin = cc.instantiate(this.message) ;
cc.beimi.openwin.parent = this.root();
},
onShareClick:function(){
cc.beimi.openwin = cc.instantiate(this.share) ;
cc.beimi.openwin.parent = this.root();
},
onPlaywayClick:function(){
cc.beimi.openwin = cc.instantiate(this.playway) ;
cc.beimi.openwin.parent = this.root();
},
onRecordClick:function(){
cc.beimi.openwin = cc.instantiate(this.playway) ;
cc.beimi.openwin.parent = this.root();
},
onFeedBackClick:function(){
cc.beimi.openwin = cc.instantiate(this.feedback) ;
cc.beimi.openwin.parent = this.root();
}
// called every frame, uncomment this function to activate update callback
// update: function (dt) {
// },
});

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "4ee594c6-0775-4564-b42e-ba36af982c46",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,63 @@
// Learn cc.Class:
// - [Chinese] http://www.cocos.com/docs/creator/scripting/class.html
// - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/class/index.html
// Learn Attribute:
// - [Chinese] http://www.cocos.com/docs/creator/scripting/reference/attributes.html
// - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/reference/attributes/index.html
// Learn life-cycle callbacks:
// - [Chinese] http://www.cocos.com/docs/creator/scripting/life-cycle-callbacks.html
// - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/life-cycle-callbacks/index.html
cc.Class({
extends: cc.Component,
properties: {
// foo: {
// // ATTRIBUTES:
// default: null, // The default value will be used only when the component attaching
// // to a node for the first time
// type: cc.SpriteFrame, // optional, default is typeof default
// serializable: true, // optional, default is true
// },
// bar: {
// get () {
// return this._bar;
// },
// set (value) {
// this._bar = value;
// }
// },
title_message: {
default: null,
type: cc.Node
},
title_contact: {
default: null,
type: cc.Node
},
},
// LIFE-CYCLE CALLBACKS:
onLoad : function() {
this.title_contact.active = false ;
this.title_message.active = true ;
/**
* 从远程加载数据,如果加载数据失败,则显示提示消息,并注册拖动刷新事件
*/
},
onContacts:function(){
this.title_contact.active = true ;
this.title_message.active = false ;
},
onMessage:function(){
this.title_contact.active = false ;
this.title_message.active = true ;
}
// update (dt) {},
});

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "c56ed1cf-991a-4449-92b7-f1d85133c0f1",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,87 @@
cc.Class({
extends: cc.Component,
properties: {
// foo: {
// default: null, // The default value will be used only when the component attaching
// to a node for the first time
// url: cc.Texture2D, // optional, default is typeof default
// serializable: true, // optional, default is true
// visible: true, // optional, default is true
// displayName: 'Foo', // optional
// readonly: false, // optional, default is false
// },
// ...
music:{
default: null,
type: cc.Sprite
},
musicSlider:{
default: null,
type: cc.Slider
},
sound:{
default: null,
type: cc.Sprite
},
soundSlider:{
default: null,
type: cc.Slider
},
musicon:{
default: null,
type: cc.Node
},
musicoff:{
default: null,
type: cc.Node
},
soundon:{
default: null,
type: cc.Node
},
soundoff:{
default: null,
type: cc.Node
},
},
// use this for initialization
onLoad: function () {
this.musicSlider.progress = cc.beimi.audio.bgVolume;
this.music.fillRange = cc.beimi.audio.bgVolume ;
if(cc.beimi.audio.getState() == cc.audioEngine.AudioState.PLAYING){
this.musicon.active = true ;
this.musicoff.active = false;
}else{
this.musicon.active = false ;
this.musicoff.active = true
}
},
onMusicSlide:function(slider){
this.music.fillRange = slider.progress ;
cc.beimi.audio.setBGMVolume(slider.progress) ;
this.musicon.active = true ;
this.musicoff.active = false;
},
onSoundSlide:function(slider){
this.sound.fillRange = slider.progress ;
},
onMusiceBtnClick:function(){
if(cc.beimi.audio.getState() == cc.audioEngine.AudioState.PLAYING){
this.musicon.active = false ;
this.musicoff.active = true;
cc.beimi.audio.pauseAll();
}else{
this.musicon.active = true ;
this.musicoff.active = false;
cc.beimi.audio.resumeAll();
}
}
// called every frame, uncomment this function to activate update callback
// update: function (dt) {
// },
});

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "904317f6-dc98-42d0-aa13-2068294fc6fb",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}