123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- cc.Class({
- extends: cc.Component,
- properties: {
-
- },
- statics: {
- EFFECT_NUM: 3,
- AN_GANG_NUM_W: 2,
- RAW_KIND: "",
- GAME_BACKGRUAND: "bgm",//背景音乐
-
- WARNING: "alarm",//显示牌动画声音
-
- EX_BUTTON: "open",//
- EX_COUNTDOWN: "time",//倒计时声音
- GAME_START: "start_game",
- GAME_WIN: "win",
- GAME_LOSE: "lose",
- DIAN_PAO: "dianpao",
- SHUFFLE: "washcard1",
- SENDCARD: "washcard2",
- MOVECARD: "movecard",
- CARD: "card",
- OUTKING: "outking",
- WINKING: "kingwin",
- ADDBET: "addbet",
- THROW_COIN: "bet",
- PICK_COIN: "coin",
- TRUCO_TY: "tytruco",
- TRUCO_FQ: "fqtruco",
- LG_PATH_SC: "",
- LG_FLAG_SC: "local/",
- LG_FLAG_PT: "putong/",
- bgmAudioID:-1,
- setPuTong(puTong) {
- },
- playBackMusic(kName) {
- var path = this.LG_PATH_SC + kName;
- if (cc.vv && cc.vv.audioMgr) {
- this.bgmAudioID = cc.vv.audioMgr.playBGM(path);
- }
- },
- stopBackMusic() {
- if (cc.vv && cc.vv.audioMgr) {
- cc.vv.audioMgr.stopBackMusic();
- }
- },
- playEffect(kName, preload) {
- var path = this.LG_PATH_SC + kName;
- if (cc.vv && cc.vv.audioMgr) {
- var audioID = cc.vv.audioMgr.playSFX(path);
- }
- },
- playEffectDefineString(kName, preload) {
- if (cc.vv && cc.vv.audioMgr) {
- var audioID = cc.vv.audioMgr.playSFX(kName);
- }
- },
- playCardTypeByGender(iGender, cardpoint) {
- var path = "";
- if (iGender > 0) {
- path = "man/" + "cow_" + cardpoint ;
- }else{
- path = "woman/" + "cow_" + cardpoint ;
- }
- return this.playEffect(path, false);
- },
- playTypeByGender(iGender, type) {
- var path = "";
- if (iGender > 0) {
- path = "man/" + "type_" + type ;
- }else{
- path = "woman/" + "type_" + type ;
- }
- return this.playEffect(path, false);
- },
- playEffectByGender(iGender, kName) {
- var path = "";
- if (iGender > 0) {
- path = "man/" + kName ;
- }else{
- path = "woman/" + kName ;
- }
- return this.playEffect(path, false);
- },
- playEffectEX(kName) {
- var path = this.LG_PATH_SC + "effect/" + kName;
- if (cc.vv && cc.vv.audioMgr) {
- var audioID = cc.vv.audioMgr.playSFX(path);
- }
- },
- getDefineSound(iGender, kStr) {
- var value = "fix_msg_" + kStr;
- var path = this.LG_PATH_SC;
- if (iGender > 0) {
- path += "talk/man/" + value + this.RAW_KIND;
- }else{
- path += "talk/woman/" + value + this.RAW_KIND;
- }
- return path;
- },
- },
- // LIFE-CYCLE CALLBACKS:
- // onLoad () {},
- start () {
- },
- // update (dt) {},
- });
|