本文整理匯總了Java中org.rev317.min.accessors.Client.getMenuAction2方法的典型用法代碼示例。如果您正苦於以下問題:Java Client.getMenuAction2方法的具體用法?Java Client.getMenuAction2怎麽用?Java Client.getMenuAction2使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.rev317.min.accessors.Client
的用法示例。
在下文中一共展示了Client.getMenuAction2方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: intercept
import org.rev317.min.accessors.Client; //導入方法依賴的package包/類
public static void intercept(int index) {
int outputIndex = 0;
Client client = Loader.getClient();
int action1 = client.getMenuAction1()[index];
int action2 = client.getMenuAction2()[index];
int action3 = client.getMenuAction3()[index];
int action4 = 0;
int actionId = client.getMenuActionId()[index];
if (DActions.debugActions()) {
if (Game.hasAction4()) {
action4 = client.getMenuAction4()[index];
System.out.println(String.format(outputs[0][outputIndex], index, action1, action2, action3, action4, actionId));
} else {
System.out.println(String.format(outputs[1][outputIndex], index, action1, action2, action3, actionId));
}
}
final GameActionEvent actionEvent = new GameActionEvent(actionId, action1, action2, action3, action4, index);
ScriptEngine.getInstance().dispatch(actionEvent);
}
示例2: sendAction
import org.rev317.min.accessors.Client; //導入方法依賴的package包/類
/**
* Sends an action to the client
*
* @param action
* @param cmd1
* @param cmd2
* @param cmd3
* @param cmd4
* @param index
*/
public static void sendAction(int action, int cmd1, int cmd2, int cmd3, int cmd4, int index) {
Client client = Loader.getClient();
client.getMenuAction1()[index] = cmd1;
client.getMenuAction2()[index] = cmd2;
client.getMenuAction3()[index] = cmd3;
if (Game.hasAction4()) {
client.getMenuAction4()[index] = cmd4;
}
client.getMenuActionId()[index] = action;
client.doAction(index);
}