1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import { _decorator } from "cc";
- import { room_type } from "../../constant";
- import { GameMng } from "../../GameMng";
- import { Singleton } from "../../gcommon/Singleton";
- const {ccclass, property} = _decorator;
- export const enum ChessType{
- renjiboyi,
- canju,
- haoyou,
- jifen,
- _null,
- }
- @ccclass
- export default class ChessMng extends Singleton<ChessMng>() {
-
- public chesstype:ChessType=ChessType._null;
- isTongqianRoom():boolean{
- if(GameMng._userData.room===null||GameMng._userData.room===undefined){
- return false;
- }
- if(GameMng._userData.room.roomtype==room_type._gaoji_tongqian||GameMng._userData.room.roomtype==room_type._chuji_tongqian||GameMng._userData.room.roomtype==room_type._zhongji_tongqian){
- return true;
- }
- return false;
- }
- isHaoyouRoom():boolean{
- if(GameMng._userData.room===null||GameMng._userData.room===undefined){
- return false;
- }
- if(GameMng._userData.room.roomtype==room_type._jing_dian_hao_you||GameMng._userData.room.roomtype==room_type._mei_miao_die_jia_hao_you){
- return true;
- }
- return false;
- }
- isJiFenRoom():boolean{
- if(GameMng._userData.room===null||GameMng._userData.room===undefined){
- return false;
- }
- if(GameMng._userData.room.roomtype==room_type._jifen_5||GameMng._userData.room.roomtype==room_type._jifen_10||GameMng._userData.room.roomtype==room_type._jifen_20){
- return true;
- }
- return false;
- }
- }
|