public void DisplayPoliticalPhaseDialogs(TtaGame game) { HideAllPoliticalPhaseDialogs(); //根据事件判断当前阶段到底是哪一个阶段 var actions = game.PossibleActions; //每一个内容都对应一个独立的dialog if (actions.FirstOrDefault(a => a.ActionType == PlayerActionType.PassPoliticalPhase) != null) { //假如含有PassPoliticalPhase,就是始动阶段 PoliticalPhaseDialogFrame.gameObject.SetActive(true); PoliticalPhaseDialogFrame.transform.position = new Vector3(-3.9f, 2.4f, -5f); PoliticalPhaseDialogFrame.Refresh(); } else if (actions.FirstOrDefault(a => a.ActionType == PlayerActionType.PassPoliticalPhase) != null) { //含有Bid或者SendColonist则是殖民阶段 } else if (actions.FirstOrDefault(a => a.ActionType == PlayerActionType.PassPoliticalPhase) != null) { //含有ResolveAction则是受到事件影响的阶段 } else if (actions.FirstOrDefault(a => a.ActionType == PlayerActionType.PassPoliticalPhase) != null) { //含有Defend则是抵御入侵的阶段 } }
public void DisplayPoliticalPhaseDialogs(TtaGame game) { HideAllPoliticalPhaseDialogs(); //根据事件判断当前阶段到底是哪一个阶段 var actions = game.PossibleActions; //每一个内容都对应一个独立的dialog if (Manager.CurrentGame.CurrentPhase == TtaPhase.PoliticalPhase /*actions.FirstOrDefault(a => a.ActionType == PlayerActionType.PassPoliticalPhase) != null*/) { //假如含有PassPoliticalPhase,就是始动阶段 PoliticalPhaseDialogFrame.gameObject.SetActive(true); PoliticalPhaseDialogFrame.transform.localPosition = new Vector3(-3.9f, 2.4f, -5f); PoliticalPhaseDialogFrame.DisplayDialog(); } else if (actions.FirstOrDefault(a => a.ActionType == PlayerActionType.PassPoliticalPhase) != null) { //含有Bid或者SendColonist则是殖民阶段 } else if (Manager.CurrentGame.CurrentPhase == TtaPhase.EventResolution) { //含有ResolveAction则是受到事件影响的阶段 ResolveEventDialogFrame.gameObject.SetActive(true); ResolveEventDialogFrame.transform.localPosition = new Vector3(-3.61f, 1.6f, -5f); ResolveEventDialogFrame.DisplayDialog(); } else if (actions.FirstOrDefault(a => a.ActionType == PlayerActionType.PassPoliticalPhase) != null) { //含有Defend则是抵御入侵的阶段 } }
public IEnumerator TakeInternalAction(TtaGame game, PlayerAction action, Action <List <PlayerAction> > callback) { if (callback != null) { callback(new List <PlayerAction>()); } yield break; }
public IEnumerator TakeAction(TtaGame game, PlayerAction action, Action callback) { if (callback != null) { callback(); } yield break; }
private void DisplayEventsAndCardCounts(TtaGame game) { //EventsFrame.Refresh(); CivilCardLeft.GetComponent <TextMesh>().text = game.CivilCardsRemain.ToString(); MilitaryCardLeft.GetComponent <TextMesh>().text = game.MilitaryCardsRemain.ToString(); CivilCardAge.GetComponent <TextMesh>().text = game.CurrentAge.ToString(); MilitaryCardAge.GetComponent <TextMesh>().text = game.CurrentAge.ToString(); }
public IEnumerator RefreshBoard(TtaGame game, Action callback) { var html = Resources.Load <TextAsset>(File);; BgoPageProvider.FillGameBoard(html.text, game as BgoGame); if (callback != null) { callback(); } yield break; }
public IEnumerator RefreshBoard(TtaGame game, Action callback) { if (!(game is BgoGame)) { return(null); } var bgoGame = (BgoGame)game; return(BgoPageProvider.RefreshBoard(sessionObject._phpSession, bgoGame, () => { if (callback != null) { callback(); } })); }
public IEnumerator TakeInternalAction(TtaGame game, PlayerAction action, Action <List <PlayerAction> > callback) { BgoGame bgoGame = game as BgoGame; BgoPlayerAction bgoAction = action as BgoPlayerAction; Action <List <PlayerAction> > callbackDelegate = (actions) => { if (callback != null) { callback(actions); } }; if (bgoAction == null) { LogRecorder.Log("Null Action!"); return(null); } return(BgoPostProvider.PostInternalAction(sessionObject, bgoGame, bgoAction, callbackDelegate)); }
protected override void Refresh() { TtaGame game = SceneTransporter.CurrentGame; if (SceneTransporter.CurrentGame.CurrentEventCard != null) { JoanOfArcPreviewPopup.GetComponent <PCBoardCardDisplayBehaviour>().Bind(SceneTransporter.CurrentGame.CurrentEventCard); JoanOfArcPreviewPopup.SetActive(true); } else { JoanOfArcPreviewPopup.SetActive(false); } if (_hiddenEventsPrefeb == null) { _hiddenEventsPrefeb = Resources.Load <GameObject>("Dynamic-PC/HiddenEvent"); _hiddenEventsSeperatorPrefeb = Resources.Load <GameObject>("Dynamic-PC/HiddenEventSeperator"); _smallCardPrefeb = Resources.Load <GameObject>("Dynamic-PC/PCBoardCard-Small"); } int i = 0; for (; i < game.Boards.Count; i++) { PlayedEventTableFrames[i].SetActive(true); DisplayPlayerEvents(game.Boards[i], PlayedEventTableFrames[i]); } for (; i < 4; i++) { PlayedEventTableFrames[i].SetActive(false); } DisplayMyEvents(game.Boards[SceneTransporter.CurrentGame.MyPlayerIndex]); }
public IEnumerator RefreshBoard(TtaGame game, Action callback) { yield break; }