private PlayerPanel GetPlayerPanel(int seat) { // 映射 int uiSeat = SeatHelper.MappingToView(LocalPlayerComponent.Instance.LocalPlayerSeatIndex, seat, this.playerPanels.Length); return(this.playerPanels[uiSeat]); }
public void TestMapping() { int count = 4; int selfSeat = 1; // 3 int val = SeatHelper.MappingToView(selfSeat, 0, count); Assert.AreEqual(val, 3); // 0 val = SeatHelper.MappingToView(selfSeat, 1, count); Assert.AreEqual(val, 0); // 1 val = SeatHelper.MappingToView(selfSeat, 2, count); Assert.AreEqual(val, 1); // 2 val = SeatHelper.MappingToView(selfSeat, 3, count); Assert.AreEqual(val, 2); }