本文整理汇总了C#中WinterLeaf.Engine.Classes.View.Creators.ObjectCreator.bind方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectCreator.bind方法的具体用法?C# ObjectCreator.bind怎么用?C# ObjectCreator.bind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WinterLeaf.Engine.Classes.View.Creators.ObjectCreator
的用法示例。
在下文中一共展示了ObjectCreator.bind方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: initialize
public static void initialize()
{
if ("moveMap".isObject())
"moveMap".delete();
ActionMap moveMap = new ObjectCreator("ActionMap", "moveMap").Create();
ActionMap GlobalActionMap = "GlobalActionMap";
moveMap.bindCmd("keyboard", "escape", "", "handleEscape();");
moveMap.bind("keyboard", "F2", "showPlayerList");
moveMap.bind("keyboard", "ctrl h", "hideHUDs");
moveMap.bind("keyboard", "alt p", "doScreenShotHudless");
moveMap.bind("keyboard", "a", "moveleft");
moveMap.bind("keyboard", "d", "moveright");
moveMap.bind("keyboard", "left", "moveleft");
moveMap.bind("keyboard", "right", "moveright");
moveMap.bind("keyboard", "w", "moveforward");
moveMap.bind("keyboard", "s", "movebackward");
moveMap.bind("keyboard", "up", "moveforward");
moveMap.bind("keyboard", "down", "movebackward");
moveMap.bind("keyboard", "e", "moveup");
moveMap.bind("keyboard", "c", "movedown");
moveMap.bind("keyboard", "space", "jump");
moveMap.bind("mouse", "xaxis", "yaw");
moveMap.bind("mouse", "yaxis", "pitch");
moveMap.bind("gamepad", "thumbrx", "D", "-0.23 0.23", "gamepadYaw");
moveMap.bind("gamepad", "thumbry", "D", "-0.23 0.23", "gamepadPitch");
moveMap.bind("gamepad", "thumblx", "D", "-0.23 0.23", "gamePadMoveX");
moveMap.bind("gamepad", "thumbly", "D", "-0.23 0.23", "gamePadMoveY");
moveMap.bind("gamepad", "btn_a", "jump");
moveMap.bindCmd("gamepad", "btn_back", "disconnect();", "");
moveMap.bindCmd("gamepad", "dpadl", "toggleLightColorViz();", "");
moveMap.bindCmd("gamepad", "dpadr", "metrics(fps);", "");
//moveMap.bindCmd("gamepad", "dpadu", "toggleDepthViz();", "");
GlobalActionMap.bind("gamepad", "dpadu", "toggleConsole");
moveMap.bindCmd("gamepad", "dpadd", "toggleNormalsViz();", "");
//moveMap.bindCmd("gamepad", "dpadr", "toggleLightSpecularViz();", "");
moveMap.bind("keyboard", "lcontrol", "doCrouch");
moveMap.bind("gamepad", "btn_b", "doCrouch");
moveMap.bind("keyboard", "lshift", "doSprint");
moveMap.bind("gamepad", "btn_lt", "doSprint"); //Analog_LT Click
moveMap.bind("mouse", "button0", "mouseFire");
moveMap.bind("gamepad", "triggerr", "gamepadFire");
moveMap.bind("gamepad", "triggerl", "gamepadAltTrigger");
if (omni.sGlobal["$Player::CurrentFOV"] == "")
omni.iGlobal["$Player::CurrentFOV"] = omni.iGlobal["$pref::Player::DefaultFOV"]/2;
moveMap.bind("keyboard", "f", "setZoomFOV"); // f for field of view
moveMap.bind("keyboard", "z", "toggleZoom"); // z for zoom
moveMap.bind("mouse", "button1", "mouseButtonZoom");
moveMap.bind("gamepad", "btn_rt", "toggleZoom");
moveMap.bind("keyboard", "v", "toggleFreeLook"); // v for vanity
moveMap.bind("keyboard", "tab", "toggleFirstPerson");
moveMap.bind("keyboard", "alt c", "toggleCamera");
moveMap.bind("gamepad", "btn_start", "toggleCamera");
moveMap.bind("gamepad", "btn_y", "toggleFirstPerson");
moveMap.bindCmd("gamepad", "btn_x", "commandToServer('reloadWeapon');", ""); //Button_X
// ----------------------------------------------------------------------------
// Misc. Player stuff
// ----------------------------------------------------------------------------
// Gideon does not have these animations, so the player does not need access to
// them. Commenting instead of removing so as to retain an example for those
// who will want to use a player model that has these animations and wishes to
// use them.
//moveMap.bindCmd(keyboard, "ctrl w", "commandToServer('playCel',\"wave\");", "");
//moveMap.bindCmd(keyboard, "ctrl s", "commandToServer('playCel',\"salute\");", "");
moveMap.bindCmd("keyboard", "ctrl k", "commandToServer('suicide');", "");
//------------------------------------------------------------------------------
// Item manipulation
//------------------------------------------------------------------------------
moveMap.bindCmd("keyboard", "1", "commandToServer('use',\"Ryder\");", "");
moveMap.bindCmd("keyboard", "2", "commandToServer('use',\"Lurker\");", "");
moveMap.bindCmd("keyboard", "3", "commandToServer('use',\"LurkerGrenadeLauncher\");", "");
moveMap.bindCmd("keyboard", "4", "commandToServer('use',\"ProxMine\");", "");
moveMap.bindCmd("keyboard", "5", "commandToServer('use',\"DeployableTurret\");", "");
moveMap.bindCmd("keyboard", "r", "commandToServer('reloadWeapon');", "");
moveMap.bind("keyboard", "0", "unmountWeapon");
moveMap.bind("keyboard", "alt w", "throwWeapon");
//.........这里部分代码省略.........