接口 OperationFactory
public interface OperationFactory
玩法操作工厂
- 从以下版本开始:
- 21.8
- 作者:
- 渔民小镇
- 日期:
- 2024-05-12
-
方法概要
修饰符和类型方法说明getOperationHandler(int operation) 获取 OperationHandler(玩法操作业务类)getUserOperationHandler(int operation) 获取玩家可操作的 OperationHandler(玩法操作业务类)voidmapping(int operation, OperationHandler operationHandler) 将操作码与 OperationHandler(玩法操作业务类)关联default voidmapping(com.iohao.game.common.kit.OperationCode operationCode, OperationHandler operationHandler) 将操作码与 OperationHandler(玩法操作业务类)关联voidmappingUser(int operation, OperationHandler operationHandler) 玩家可操作的 OperationHandler。default voidmappingUser(com.iohao.game.common.kit.OperationCode operationCode, OperationHandler operationHandler) 玩家可操作的 OperationHandler。static OperationFactoryof()创建 OperationFactory 对象(框架提供的内置实现)optionalOperationHandler(int operation) 通过操作码得到 OperationHandler Optional
-
方法详细资料
-
getOperationHandler
获取 OperationHandler(玩法操作业务类)- 参数:
operation- 操作码- 返回:
- 操作码对应的业务逻辑处理类
-
getUserOperationHandler
获取玩家可操作的 OperationHandler(玩法操作业务类)- 参数:
operation- 操作码- 返回:
- 玩法操作业务类
-
mapping
将操作码与 OperationHandler(玩法操作业务类)关联- 参数:
operation- 操作码operationHandler- 玩法操作业务类
-
mappingUser
玩家可操作的 OperationHandler。将操作码与 OperationHandler(玩法操作业务类)关联- 参数:
operation- 操作码operationHandler- 玩法操作业务类
-
mappingUser
default void mappingUser(com.iohao.game.common.kit.OperationCode operationCode, OperationHandler operationHandler) 玩家可操作的 OperationHandler。将操作码与 OperationHandler(玩法操作业务类)关联- 参数:
operationCode- 操作码operationHandler- 玩法操作业务类- 从以下版本开始:
- 21.23
-
mapping
default void mapping(com.iohao.game.common.kit.OperationCode operationCode, OperationHandler operationHandler) 将操作码与 OperationHandler(玩法操作业务类)关联- 参数:
operationCode- 操作码operationHandler- 玩法操作业务类- 从以下版本开始:
- 21.23
-
optionalOperationHandler
通过操作码得到 OperationHandler Optional- 参数:
operation- 操作码- 返回:
- Optional OperationHandler
-
of
创建 OperationFactory 对象(框架提供的内置实现)- 返回:
- OperationFactory 对象
-