代码拉取完成,页面将自动刷新
inline void InputKey(role& player)
{
/* */
if ( ::GetAsyncKeyState( 'J' ) ) {
player.addBullet( ::GetAsyncKeyState( VK_LCONTROL ) );
}
if ( ::GetAsyncKeyState( 'A' ) && !::GetAsyncKeyState( 'I' ) || ::GetAsyncKeyState( VK_LEFT ) && !::GetAsyncKeyState( 'I' ) ) {
player.turnL( ::GetAsyncKeyState( VK_LCONTROL ) );
} else if ( ::GetAsyncKeyState( 'A' ) && ::GetAsyncKeyState( 'I' ) || ::GetAsyncKeyState( VK_LEFT ) && ::GetAsyncKeyState( 'I' ) ) {
for ( int i = 0; i < 90; i += 5 ) {
player.r += PI / 180 * 5;
pR = player.r;
runGrain();
drawGame( player );
imagefilter_blurring( NULL, 0xFF, 0x100 );
delay_fps( 60 );
}
}
if ( ::GetAsyncKeyState( 'D' ) && !::GetAsyncKeyState( 'I' ) || ::GetAsyncKeyState( VK_RIGHT ) && !::GetAsyncKeyState( 'I' ) ) {
player.turnR( ::GetAsyncKeyState( VK_LCONTROL ) );
} else if ( ::GetAsyncKeyState( 'D' ) && ::GetAsyncKeyState( 'I' ) || ::GetAsyncKeyState( VK_RIGHT ) && ::GetAsyncKeyState( 'I' ) ) {
for ( int i = 0; i < 90; i += 5 ) {
player.r -= PI / 180 * 5;
pR = player.r;
runGrain();
drawGame( player );
imagefilter_blurring( NULL, 0xFF, 0x100 );
delay_fps( 60 );
}
}
if ( ::GetAsyncKeyState( 'W' ) || ::GetAsyncKeyState( VK_UP ) ) {
player.addV();
}
if ( ::GetAsyncKeyState( 'S' ) && !::GetAsyncKeyState( 'I' ) || ::GetAsyncKeyState( VK_DOWN ) && !::GetAsyncKeyState( 'I' ) ) {
player.subV();
player.mV = 0;
} else if ( ::GetAsyncKeyState( 'S' ) && ::GetAsyncKeyState( 'I' ) || ::GetAsyncKeyState( VK_DOWN ) && ::GetAsyncKeyState( 'I' ) ) {
for ( int i = 0; i < 180; i += 5 ) {
player.r -= PI / 180 * 5;
pR = player.r;
runGrain();
drawGame( player );
imagefilter_blurring( NULL, 0xFF, 0x100 );
delay_fps( 60 );
}
}
if ( ::GetAsyncKeyState( '1' ) && PLAYER != NOYA ) {
if ( player.energy > 0 ) {
player.protecting = 1;
player.hE = player.energy;
}
} else if ( ::GetAsyncKeyState( '2' ) && PLAYER != NOYA ) {
if ( player.energy >= MAXE / 2 && !player.clearing ) {
player.clearing = 1;
player.hE = player.energy;
MSYS.pBlast();
}
bullets.clear();
} else if ( ::GetAsyncKeyState( 'F' ) && PLAYER != NOYA ) {
if(player.type != SPEEDER && player.energy==MAXE) {
player.protecting = 0;
player.mV = 1;
player.hE = player.life;
} else if ( player.type == SPEEDER && player.energy > 0 ) {
player.protecting = 0;
player.mV = 1;
player.hE = player.life;
}
} else if ( ::GetAsyncKeyState( 'O' ) ) {
float rA=pR;
for(float i=rA; i<rA+2*PI; i+=(float)2*PI/(player.bulletC/5)) {
player.r=i;
player.addBullet( 1 );
player.getnew();
runGrain();
drawGame( player );
imagefilter_blurring( NULL, 0xFF, 0x100 );
delay_fps( 60 );
}
player.r=rA;
player.getnew();
}
if ( ::GetAsyncKeyState( 'Q' ) ) {
// MSYS.Silence();
}
if ( player.energy < 0 )
player.energy = 0;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。