#include "DarkGDK.h"
#define PLAYER 2
void input ( void );
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
//player
dbMakeObjectSphere ( PLAYER, 1);
dbColorObject ( PLAYER, dbRGB ( 255, 0, 0 ));
while ( LoopGDK ( ) )
{
input ( );
//dbPositionCamera ( dbObjectPositionX ( PLAYER ), dbObjectPositionY ( PLAYER ), dbObjectPositionZ ( PLAYER ) - 4 );
dbSync ( );
}
return;
}
void input ( void )
{
if( dbUpKey ( ) )
{
dbMoveObject ( PLAYER, 2.0f );
}
if( dbDownKey ( ) )
{
dbMoveObject ( PLAYER, -2.0f );
}
if( dbLeftKey ( ) )
{
dbMoveObjectLeft ( PLAYER, 2.0f );
}
if( dbRightKey ( ) )
{
dbMoveObjectRight ( PLAYER, 2.0f );
}
}
this code work to me perfect..
If someone need something, add me to your msn
Was SuperKid , now AlexZinn