Download - S Console, Multi-Screen and Group Play
@Override
public boolean dispatchKeyEvent(KeyEvent event)
{
// Get the GamePad key code
final int keyCode = event.getKeyCode();
// Process the GamePad key code
switch (keyCode)
{
// Left key is down
case KeyEvent.KEYCODE_DPAD_LEFT:
ProcessGamePad_Left();
break;
switch (keyCode)
{
// Left key is down
case KeyEvent.KEYCODE_DPAD_LEFT:
ProcessGamePad_Left();
break;
...
// X key is down
case KeyEvent.KEYCODE_BUTTON_X:
ProcessGamePad_X();
break;
…
@Override
public boolean dispatchGenericMotionEvent(MotionEvent ev)
{
// Get the motion value
float xValue = ev.getAxisValue(MotionEvent.AXIS_X);
...
float yValue = ev.getAxisValue(MotionEvent.AXIS_Y);
// Process motion event
if (x > X_MOTION_THRESHOLD)
{
// Process motion event
if (xValue > X_MOTION_THRESHOLD)
{
// Process..
}
...
if (yValue > Y_MOTION_THRESHOLD)
{
// Process..
}
...
}
http://developer.samsung.com/mobile-console
삼성전자 미디어솔루션센터
게임서비스팀
김규호전무
http://bit.ly/samsunggameplatform
아래 링크의 페이스북 페이지를 통해
관심있으신 분들과
지속적인 소통을 원합니다.