public void Init(ActionStatus status) { //ActionStatus在获取的过程中,已经知道IsHost信息,所以这里的无需做Host到My的转换了 MyInfo.Init(status.AllRole.MyPublicInfo); YourInfo.Init(status.AllRole.YourPublicInfo); HandCard = new HandCardInfo[status.AllRole.MyPrivateInfo.handCards.Count]; for (int i = 0; i < status.AllRole.MyPrivateInfo.handCards.Count; i++) { HandCardInfo t = new HandCardInfo(); t.Init(status.AllRole.MyPrivateInfo.handCards[i]); HandCard[i] = t; } MyBattle = new Minion[status.AllRole.MyPublicInfo.BattleField.MinionCount]; for (int i = 0; i < status.AllRole.MyPublicInfo.BattleField.MinionCount; i++) { Minion t = new Minion(); t.Init(status.AllRole.MyPublicInfo.BattleField.BattleMinions[i]); MyBattle[i] = t; } YourBattle = new Minion[status.AllRole.YourPublicInfo.BattleField.MinionCount]; for (int i = 0; i < status.AllRole.YourPublicInfo.BattleField.MinionCount; i++) { Minion t = new Minion(); t.Init(status.AllRole.YourPublicInfo.BattleField.BattleMinions[i]); YourBattle[i] = t; } }
public void Init(ActionStatus status) { //ActionStatus在获取的过程中,已经知道IsHost信息,所以这里的无需做Host到My的转换了 MyInfo.Init(status.AllRole.MyPublicInfo); YourInfo.Init(status.AllRole.YourPublicInfo); HandCard = new HandCardInfo[status.AllRole.MyPrivateInfo.handCards.Count]; for (int i = 0; i < status.AllRole.MyPrivateInfo.handCards.Count; i++) { HandCardInfo t = new HandCardInfo(); t.Init(status.AllRole.MyPrivateInfo.handCards[i]); HandCard[i] = t; } MyBattle = new Minion[status.AllRole.MyPublicInfo.BattleField.MinionCount]; for (int i = 0; i < status.AllRole.MyPublicInfo.BattleField.MinionCount; i++) { Minion t = new Minion(); t.Init(status.AllRole.MyPublicInfo.BattleField.BattleMinions[i]); MyBattle[i] = t; } YourBattle = new Minion[status.AllRole.YourPublicInfo.BattleField.MinionCount]; for (int i = 0; i < status.AllRole.YourPublicInfo.BattleField.MinionCount; i++) { Minion t = new Minion(); t.Init(status.AllRole.YourPublicInfo.BattleField.BattleMinions[i]); YourBattle[i] = t; } }