类 SimpleRoom
java.lang.Object
com.iohao.game.widget.light.room.SimpleRoom
- 所有已实现的接口:
Room
,Serializable
房间(内置实现)
- 从以下版本开始:
- 21.8
- 作者:
- 渔民小镇
- 另请参阅:
- 日期:
- 2022-03-31
-
构造器概要
-
方法概要
修饰符和类型方法说明get 通讯上下文default RangeBroadcaster
创建一个 RangeBroadcastdefault RangeBroadcaster
ofEmptyRangeBroadcast
(CommunicationAggregationContext aggregationContext) 通过 CommunicationAggregationContext 创建一个 RangeBroadcastdefault RangeBroadcaster
创建一个 RangeBroadcast,默认会添加上当前房间内的所有玩家default RangeBroadcaster
ofRangeBroadcast
(CommunicationAggregationContext aggregationContext) 通过 CommunicationAggregationContext 创建一个 RangeBroadcast,默认会添加上当前房间内的所有玩家void
setAggregationContext
(CommunicationAggregationContext aggregationContext) 设置通讯上下文从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 com.iohao.game.widget.light.room.Room
addPlayer, countPlayer, existUser, forEach, getCreatorUserId, getEmptySeatNo, getPlayerById, getPlayerMap, getPlayerSeatMap, getRoomCreateContext, getRoomId, getRoomStatusEnum, getSpaceSize, ifPlayerExist, ifPlayerNotExist, isCreatorUserId, isEmptyPlayer, isReadyPlayers, isStatus, listPlayer, listPlayerId, removePlayer, setRoomCreateContext, setRoomId, setRoomStatusEnum, setSpaceSize, streamPlayer
-
构造器详细资料
-
SimpleRoom
public SimpleRoom()
-
-
方法详细资料
-
setAggregationContext
设置通讯上下文// 方式一:通过 flowContext 得到通讯上下文 CommunicationAggregationContext aggregationContext = flowContext.option(FlowAttr.aggregationContext); // 方式二:通过 BrokerClient 得到通讯上下文 CommunicationAggregationContext aggregationContext = BrokerClientHelper.getBrokerClient().getCommunicationAggregationContext();
- 参数:
aggregationContext
- 通讯上下文
-
getAggregationContext
CommunicationAggregationContext getAggregationContext()get 通讯上下文- 返回:
- 通讯上下文
-
ofRangeBroadcast
通过 CommunicationAggregationContext 创建一个 RangeBroadcast,默认会添加上当前房间内的所有玩家- 参数:
aggregationContext
- aggregationContext- 返回:
- RangeBroadcast 范围内的广播
-
ofEmptyRangeBroadcast
通过 CommunicationAggregationContext 创建一个 RangeBroadcast- 参数:
aggregationContext
- aggregationContext- 返回:
- RangeBroadcast 范围内的广播
-
ofRangeBroadcast
创建一个 RangeBroadcast,默认会添加上当前房间内的所有玩家- 返回:
- RangeBroadcast 范围内的广播
-
ofEmptyRangeBroadcast
创建一个 RangeBroadcast- 返回:
- RangeBroadcast 范围内的广播
-