public MahjongDealerIndicator( MahjongGame game, Point2D position, MahjongPieceDirection direction, MahjongWind wind ) { m_Game = game; m_Position = position; m_Direction = direction; m_Wind = wind; }
public MahjongWallBreakIndicator( MahjongGame game, GenericReader reader ) { m_Game = game; int version = reader.ReadInt(); m_Position = reader.ReadPoint2D(); }
public MahjongDices( MahjongGame game, GenericReader reader ) { m_Game = game; int version = reader.ReadInt(); m_First = reader.ReadInt(); m_Second = reader.ReadInt(); }
public MahjongTile( MahjongGame game, int number, MahjongTileType value, Point2D position, int stackLevel, MahjongPieceDirection direction, bool flipped ) { m_Game = game; m_Number = number; m_Value = value; m_Position = position; m_StackLevel = stackLevel; m_Direction = direction; m_Flipped = flipped; }
public MahjongDealerIndicator( MahjongGame game, GenericReader reader ) { m_Game = game; int version = reader.ReadInt(); m_Position = reader.ReadPoint2D(); m_Direction = (MahjongPieceDirection) reader.ReadInt(); m_Wind = (MahjongWind) reader.ReadInt(); }
public MahjongTile(MahjongGame game, int number, MahjongTileType value, Point2D position, int stackLevel, MahjongPieceDirection direction, bool flipped) { Game = game; Number = number; Value = value; m_Position = position; StackLevel = stackLevel; Direction = direction; Flipped = flipped; }
public void Setting(MahjongMachine mjMachine) { this.mjMachine = mjMachine; mjGame = mjMachine.mjGame; mjAssets = mjMachine.mjAssets; defaultPrefabDict = mjAssets.defaultPrefabDict; effectPrefabDict = mjAssets.effectPrefabDict; mjpaiPrefabDict = mjAssets.mjpaiPrefabDict; uiPrefabDict = mjAssets.uiPrefabDict; }
/// <summary> /// 设置骰子机 /// </summary> public void Setting(MahjongMachine mjMachine) { this.mjMachine = mjMachine; mjGame = mjMachine.mjGame; mjAssets = mjMachine.mjAssets; mjAssetsMgr = mjMachine.mjAssetsMgr; mjTable = mjMachine.mjtableTransform; numSpritesDict = mjMachine.mjAssets.settingDataAssetsMgr.GetSpritesIntKeyDict((int)SpritesType.DICE_MACHINE_TIMER_NUM); blueNums = numSpritesDict[(int)SpriteIdx.BLUE_NUMS]; prefabDiceMachine = mjAssets.defaultPrefabDict[(int)PrefabIdx.DICE_MACHINE][0]; }
public MahjongTile( MahjongGame game, GenericReader reader ) { m_Game = game; int version = reader.ReadInt(); m_Number = reader.ReadInt(); m_Value = (MahjongTileType) reader.ReadInt(); m_Position = reader.ReadPoint2D(); m_StackLevel = reader.ReadInt(); m_Direction = (MahjongPieceDirection) reader.ReadInt(); m_Flipped = reader.ReadBool(); }
public MahjongTile(MahjongGame game, GenericReader reader) { m_Game = game; int version = reader.ReadInt(); m_Number = reader.ReadInt(); m_Value = (MahjongTileType)reader.ReadInt(); m_Position = reader.ReadPoint2D(); m_StackLevel = reader.ReadInt(); m_Direction = (MahjongPieceDirection)reader.ReadInt(); m_Flipped = reader.ReadBool(); }
public MahjongTile(MahjongGame game, IGenericReader reader) { Game = game; var version = reader.ReadInt(); Number = reader.ReadInt(); Value = (MahjongTileType)reader.ReadInt(); m_Position = reader.ReadPoint2D(); StackLevel = reader.ReadInt(); Direction = (MahjongPieceDirection)reader.ReadInt(); Flipped = reader.ReadBool(); }
public void Setting(MahjongMachine mjMachine) { this.mjMachine = mjMachine; mjGame = mjMachine.mjGame; mjAssets = mjMachine.mjAssets; mjAssetsMgr = mjMachine.mjAssetsMgr; uiCanvasTransform = mjMachine.uiCanvasTransform; prefabUiPaiTips = mjAssets.uiPrefabDict[(int)PrefabIdx.UI_CHIPAI_TIPS][0]; paiTipsOrgSize = prefabUiPaiTips.GetComponent <RectTransform>().sizeDelta; prefabUiPaiDetailTips = mjAssets.uiPrefabDict[(int)PrefabIdx.UI_CHIPAI_DETAIL_TIPS][0]; detailTipsSize = prefabUiPaiDetailTips.GetComponent <RectTransform>().sizeDelta; }
public void Setting(MahjongMachine mjMachine) { this.mjMachine = mjMachine; mjGame = mjMachine.mjGame; mjAssets = mjMachine.mjAssets; mjAssetsMgr = mjMachine.mjAssetsMgr; uiCanvasTransform = mjMachine.uiCanvasTransform; prefabUIScoreDec = mjAssets.uiPrefabDict[(int)PrefabIdx.UI_SCORE][0]; prefabUIScoreInc = mjAssets.uiPrefabDict[(int)PrefabIdx.UI_SCORE][1]; prefabSpeedLine = mjAssets.effectPrefabDict[(int)PrefabIdx.UI_SPEED_LINE_EFFECT][0]; prefabStarShan = mjAssets.effectPrefabDict[(int)PrefabIdx.UI_STAR_SHAN_EFFECT][0]; }
public MahjongPlayers(MahjongGame game, int maxPlayers, int baseScore) { _game = game; _spectators = new List <Mobile>(); _players = new Mobile[maxPlayers]; _inGame = new bool[maxPlayers]; _publicHand = new bool[maxPlayers]; _scores = new int[maxPlayers]; for (var i = 0; i < _scores.Length; i++) { _scores[i] = baseScore; } }
public void TestMahjongGeneralInfo(bool showScores, bool spectatorVision) { var game = new MahjongGame { ShowScores = showScores, SpectatorVision = spectatorVision }; var expected = new MahjongGeneralInfo(game).Compile(); var ns = PacketTestUtilities.CreateTestNetState(); ns.SendMahjongGeneralInfo(game); var result = ns.SendPipe.Reader.TryRead(); AssertThat.Equal(result.Buffer[0].AsSpan(0), expected); }
public void Setting(MahjongMachine mjMachine) { this.mjMachine = mjMachine; mjGame = mjMachine.mjGame; mjAssets = mjMachine.mjAssets; mjAssetsMgr = mjMachine.mjAssetsMgr; uiCanvasTransform = mjMachine.uiCanvasTransform; prefabUiSelectHuaSeHandPaiTips = mjAssets.uiPrefabDict[(int)PrefabIdx.UI_SELECT_SWAP_HANDPAI][0]; selectSpriteDict = mjMachine.mjAssets.settingDataAssetsMgr.GetSpritesIntKeyDict((int)SpritesType.SELECT); que_text = selectSpriteDict[(int)SpriteIdx.SELECT_QUE_TEXT]; ding_text = selectSpriteDict[(int)SpriteIdx.SELECT_DING_TEXT]; numSprites = selectSpriteDict[(int)SpriteIdx.SELECT_NUMS]; greyNumSprites = selectSpriteDict[(int)SpriteIdx.SELECT_NUMS_GREY]; kuohaoSprites = selectSpriteDict[(int)SpriteIdx.SELECT_KUOHAO]; }
public void Setting(MahjongMachine mjMachine) { this.mjMachine = mjMachine; mjGame = mjMachine.mjGame; mjAssets = mjMachine.mjAssets; mjAssetsMgr = mjMachine.mjAssetsMgr; uiCanvasTransform = mjMachine.uiCanvasTransform; pcghtBtnLayout = uiCanvasTransform.Find("PengChiGangHuTingBtnLayout"); layoutOrgPos = pcghtBtnLayout.localPosition; uiHuBtn.Setting(mjMachine); uiPengBtn.Setting(mjMachine, PengChiGangTingHuType.PENG); uiChiBtn.Setting(mjMachine, PengChiGangTingHuType.CHI); uiGangBtn.Setting(mjMachine, PengChiGangTingHuType.GANG); uiTingBtn.Setting(mjMachine, PengChiGangTingHuType.TING); uiGuoBtn.Setting(mjMachine, PengChiGangTingHuType.GUO); uiCancelBtn.Setting(mjMachine, PengChiGangTingHuType.CANCEL); }
void Start() { //UIDebugViewController.Instance.OpenViewRoot (); int level = SceneManager.GetActiveScene().buildIndex; switch (level) { case 0: break; case 1: { UILoginController.Instance.Open(); } break; case 2: { UIMainMenuController.Instance.Open(); } break; case 3: { var go = new GameObject("MahjongGame"); MahjongGame game = go.AddComponent <MahjongGame>(); GameClient.Instance.CurrentGameMode = game; UIGameSetingController.Instance.Open(); if (GameClient.Instance.GameStateDef != null) { game.OnRestoreGameState(GameClient.Instance.GameStateDef); GameClient.Instance.GameStateDef = null; UIGameSetingController.Instance.OnRefreshHeadAll(); GameClient.Instance.MG._shuffle_initpocket_state = 1; } } break; } }
public void TestMahjongTilesInfo(bool spectatorVision) { var m = new Mobile(0x1); m.DefaultMobileInit(); var game = new MahjongGame { SpectatorVision = spectatorVision }; game.Players.Join(m); var expected = new MahjongTilesInfo(game, m).Compile(); var ns = PacketTestUtilities.CreateTestNetState(); ns.SendMahjongTilesInfo(game, m); var result = ns.SendPipe.Reader.TryRead(); AssertThat.Equal(result.Buffer[0].AsSpan(0), expected); }
public void Setting(MahjongMachine mjMachine) { this.mjMachine = mjMachine; mjGame = mjMachine.mjGame; mjAssets = mjMachine.mjAssets; mjAssetsMgr = mjMachine.mjAssetsMgr; uiCanvasTransform = mjMachine.uiCanvasTransform; uiBtn = mjAssetsMgr.pengChiGangTingHuBtns[(int)PengChiGangTingHuType.HU].transform; orgUIBtnScale = uiBtn.localScale; uiBtnPS = uiBtn.GetComponent <ParticleSystem>(); huTextPS = uiBtn.Find("HuText").GetComponent <ParticleSystem>(); huTextHuXiPS = uiBtn.Find("HuTextHuXi").GetComponent <ParticleSystem>(); meiHuaImgPS = uiBtn.Find("MeiHuaImg").GetComponent <ParticleSystem>(); outsideExtGuangQuanPS = uiBtn.Find("OutsideExtGuangQuan").GetComponent <ParticleSystem>(); petalsPS = uiBtn.Find("Petals").GetComponent <ParticleSystem>(); petalsPS2 = uiBtn.Find("Petals2").GetComponent <ParticleSystem>(); petalsPS3 = uiBtn.Find("Petals3").GetComponent <ParticleSystem>(); Image img = uiBtn.GetComponent <Image>(); mat = img.material; meiHuaImgScale = meiHuaImgPS.transform.DOLocalRotate(new Vector3(0, 0, 10f), 1.5f); meiHuaImgScale.SetAutoKill(false); meiHuaImgScale.SetEase(Ease.Linear).SetLoops(-1, LoopType.Yoyo); meiHuaImgScale.Pause(); mjAssetsMgr.AppendToDestoryPool(meiHuaImgScale); EventTriggerListener.Get(uiBtn.gameObject).onDown = OnButtonDown; EventTriggerListener.Get(uiBtn.gameObject).onClick = OnButtonClick; State5(); }
public MahjongDices(MahjongGame game) { m_Game = game; m_First = Utility.Random(1, 6); m_Second = Utility.Random(1, 6); }
public MahjongDices(MahjongGame game) { Game = game; First = Utility.Random(1, 6); Second = Utility.Random(1, 6); }
public MahjongPlayers(MahjongGame game) { _game = game; _spectators = new List <Mobile>(); }
public int Renchan_Calculation(MahjongGame game) { return(game.Renchan); }
public RoundBuilder(bool tonpuusen = false) { _gameState = new MahjongGame(tonpuusen); }
public MahjongWallBreakIndicator(MahjongGame game) => _game = game;
public GameState FinishRound_ThrowsExceptionsForInvalidGameState(MahjongGame game) { game.FinishRound(new RoundResult()); return(game.State); }
public MahjongDices(MahjongGame game) { _game = game; _first = Utility.Random(1, 6); _second = Utility.Random(1, 6); }
public MahjongDices( MahjongGame game ) { m_Game = game; m_First = Utility.Random( 1, 6 ); m_Second = Utility.Random( 1, 6 ); }
public GameState GameState_ReturnsCorrectly(MahjongGame game) { return(game.State); }
public int Oya_Calculation(MahjongGame game) { return(game.Oya); }
public MahjongDealerIndicator(MahjongGame game) { _game = game; }
public MahjongTile(MahjongGame game) => _game = game;
public MahjongWallBreakIndicator(MahjongGame game, Point2D position) { m_Game = game; m_Position = position; }
public int NextRound_AddsRoundCorrectly(MahjongGame game) { game.NextRound(); return(game.Rounds.Count); }
public int NextRound_UpdatesOyaCorrectly(MahjongGame game) { game.NextRound(); return(game.Rounds.Last().Oya); }
public void NextRound_ThrowsExceptionsForInvalidGameState(MahjongGame game) { game.NextRound(); }
public MahjongWallBreakIndicator( MahjongGame game, Point2D position ) { m_Game = game; m_Position = position; }