Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1899 in orxonox.OLD for orxonox/trunk/core/orxonox.cc


Ignore:
Timestamp:
May 20, 2004, 1:03:53 PM (20 years ago)
Author:
patrick
Message:

trunk/orxonox: collision detection implemented: simple spheres. all debug informations still print out to console. one enemy added, no AI, no move, waits to be killed. No kill signal implemented yet: look debug infos on console.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/core/orxonox.cc

    r1897 r1899  
    9999{
    100100  glClearColor(0.0, 0.0, 0.0, 0.0);
     101 
     102  /* world init, shouldnt be done here later */
    101103  world = new World;
    102104  (*world).initEnvironement();
    103105  localPlayer = new Player;
     106  localPlayer->setPosition(0.0, -10.0, 3.0);
    104107  io = new InputOutput(world, localPlayer);
    105108  (*world).addPlayer(localPlayer);
    106109  Environment *env = new Environment;
    107110  (*world).addEnv(env);
     111  NPC* npc = new NPC;
     112  npc->setPosition(3.0, 0.0, 3.0);
     113  npc->setCollisionRadius(1.0);
     114  world->addNPC(npc);
    108115
    109116  glutSpecialFunc(specFunc);
     
    248255  /* increment the frames-per-second counter*/
    249256  fps++;
     257  /* check for collisions */
     258  world->detectCollision();
     259
    250260  /* check for input to pass it over */
    251261  if ( !pause && (rightWeGo || leftWeGo || upWeGo || downWeGo || shoot1)) {
Note: See TracChangeset for help on using the changeset viewer.