Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 3, 2007, 10:02:06 PM (16 years ago)
Author:
landauf
Message:

added a "Tickable"-interface
added a "Timer"-class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/orxonox.cc

    r366 r375  
    3939#include <iostream>
    4040
    41 #include "../xml/xmlParser.h"
    42 #include "../loader/LevelLoader.h"
     41//#include "../xml/xmlParser.h"
     42//#include "../loader/LevelLoader.h"
    4343
    4444#include "core/IdentifierIncludes.h"
     45#include "objects/Tickable.h"
     46#include "objects/Timer.h"
     47
    4548#include "objects/BaseObject.h"
    4649#include "objects/Test.h"
     
    4851#include "objects/test2.h"
    4952#include "objects/test3.h"
    50 
    5153
    5254// some tests to see if enet works without includsion
     
    106108      void go()
    107109      {
    108 /*
    109110        createRoot();
    110111        defineResources();
     
    117118        setupCEGUI();
    118119        createFrameListener();
    119         startRenderLoop();
    120 */
     120
    121121
    122122        #define testandcout(code) \
     
    148148        test4 = new A3();
    149149*/
    150 
     150/*
    151151        std::cout << "Test 5\n";
    152152        A1* test5_01 = new A1();
     
    218218        std::cout << "ID of BaseObject: " << Class(BaseObject)->getNetworkID() << "\n";
    219219        std::cout << "ID of Test1: " << Class(Test1)->getNetworkID() << "\n";
    220 
     220*/
    221221/*
    222222        std::cout << "\n";
     
    474474        delete test9_06;
    475475*/
    476 
     476/*
    477477        std::cout << "Test 10\n";
    478478        Identifier* test10_01 = Class(A1B2);
     
    605605
    606606        std::cout << "13\n";
    607 
     607*/
     608        std::cout << "Test 11\n";
     609/*
     610        std::cout << "1\n";
     611        count = 0; for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it) { count++; }
     612        std::cout << "AnzahlTickable: " << count << "\n";
     613
     614        Test1* test11_1;
     615        for (int i = 0; i < 3; i++)
     616            test11_1 = new Test1;
     617
     618        count = 0; for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it) { count++; }
     619        std::cout << "AnzahlTickable: " << count << "\n";
     620
     621        for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it)
     622            it->tick(0);
     623
     624        std::cout << "2\n";
     625*/
     626
     627        Test2* test11_2 = new Test2;
     628        std::cout << "3\n";
     629
     630        startRenderLoop();
    608631      }
    609632
     
    687710      {
    688711
    689         string levelFile = "sp_level_moonstation.oxw";
    690         loader::LevelLoader* loader = new loader::LevelLoader(levelFile);
     712//        string levelFile = "sp_level_moonstation.oxw";
     713//        loader::LevelLoader* loader = new loader::LevelLoader(levelFile);
    691714      }
    692715
     
    735758      void createFrameListener()
    736759      {
     760        TickFrameListener* TickFL = new TickFrameListener();
     761        mRoot->addFrameListener(TickFL);
     762
     763        TimerFrameListener* TimerFL = new TimerFrameListener();
     764        mRoot->addFrameListener(TimerFL);
     765
    737766        mListener = new OrxExitListener(mKeyboard);
    738767        mRoot->addFrameListener(mListener);
Note: See TracChangeset for help on using the changeset viewer.