本文整理汇总了C#中InControl.InputDevice.GetControl方法的典型用法代码示例。如果您正苦于以下问题:C# InputDevice.GetControl方法的具体用法?C# InputDevice.GetControl怎么用?C# InputDevice.GetControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InControl.InputDevice
的用法示例。
在下文中一共展示了InputDevice.GetControl方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
public void Update( IEnumerable<FTouch> touches, InputDevice device, float updateTime )
{
foreach (var touch in touches)
{
UpdateWithTouch( touch );
}
device.GetControl( xAxis ).UpdateWithValue( value.x, updateTime );
device.GetControl( yAxis ).UpdateWithValue( value.y, updateTime );
alpha = Mathf.MoveTowards( alpha, touchId == -1 ? 0.5f : 1.0f, 1.0f / 15.0f );
headSprite.SetPosition( delta );
}
示例2: Update
void Update() {
//Check for A button to change scene to correct boss
inputDevice = InputManager.ActiveDevice;
if(Input.GetKeyDown(KeyCode.A) || inputDevice.GetControl(InputControlType.Action1).WasPressed){
GameController.LoadLastScene();
}
}
示例3: GetState
public override bool GetState( InputDevice inputDevice )
{
if (inputDevice == null)
{
return false;
}
return inputDevice.GetControl( Control ).State;
}
示例4: GetValue
public override float GetValue( InputDevice inputDevice )
{
if (inputDevice == null)
{
return 0.0f;
}
return inputDevice.GetControl( Control ).Value;
}
示例5: Update
public void Update( IEnumerable<FTouch> touches, InputDevice device, float updateTime )
{
value = 0.0f;
foreach (var touch in touches)
{
UpdateWithTouch( touch );
}
device.GetControl( controlType ).UpdateWithValue( value, updateTime );
alpha = Mathf.MoveTowards( alpha, value > 0.0f ? 1.0f : 0.5f, 1.0f / 15.0f );
}
示例6: Update
void Update() {
//Check for A button to change scene to correct boss
inputDevice = InputManager.ActiveDevice;
if(Input.GetKeyDown(KeyCode.A) || inputDevice.GetControl(InputControlType.Action1).WasPressed){
if(bossNum == 1){
SceneManager.LoadScene("Boss - Aggression");
}
else if(bossNum == 2){
SceneManager.LoadScene("Boss - Serenity");
}
else{
SceneManager.LoadScene("Boss - Greed");
}
}
}
示例7: IsPressed
bool IsPressed( InputControlType control, InputDevice device )
{
return IsPressed( device.GetControl( control ) );
}
示例8: refreshControls
void refreshControls()
{
idevice = InputManager.ActiveDevice;
ctrl_Jump = idevice.GetControl(InputControlType.Action1);
ctrl_LeftStickX = idevice.GetControl(InputControlType.LeftStickX);
ctrl_LeftStickY = idevice.GetControl(InputControlType.LeftStickY);
ctrl_Select = idevice.GetControl(InputControlType.Select);
ctrl_Start = idevice.GetControl(InputControlType.Start);
ctrl_RightBumper = idevice.GetControl(InputControlType.RightBumper);
ctrl_RightJoystickButton = idevice.GetControl(InputControlType.RightStickButton);
ctrl_O = idevice.GetControl(InputControlType.Action2);
}