Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 21, 2007, 12:44:02 AM (16 years ago)
Author:
rgrieder
Message:
  • modified the AmmunitionDump to hold different types of ammo
  • converted the RunManager into a Singleton
  • added some methods to address ammo by string
  • created a BaseWeapon class
  • derived BarrelGun from BaseWeapon
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/main_reto_vs05/src/main.cc

    r178 r232  
    3131#include "orxonox.h"
    3232
     33#include "class_hierarchy/BaseObject.h"
     34#include "class_hierarchy/Test.h"
     35#include "class_hierarchy/test1.h"
     36#include "class_hierarchy/test2.h"
     37#include "class_hierarchy/test3.h"
     38
     39
    3340#ifdef __cplusplus
    3441extern "C" {
     
    4350#endif
    4451  {
     52#if 1
    4553    try {
    4654      // create an orxonox application and run it
     
    6068    }
    6169
     70#else
     71#define testandcout(code) \
     72    std::cout << #code << " " << code << "\n"
     73
     74    using namespace orxonox;
     75
     76    std::cout << "Test 8\n";
     77
     78    std::cout << "1\n";
     79    Test1* test8_01 = new Test1;
     80    Test1* asdf = new Test1;
     81    Test3* test8_03 = new Test3;
     82    test8_03->usefullClassesIsATest(test8_01);
     83
     84    std::cout << "2\n";
     85    Test2* test8_02 = new Test2;
     86    test8_03->usefullClassesIsATest(test8_02);
     87
     88    std::cout << "3\n";
     89    test8_01->setUsefullClass1(Class(Test1));
     90    test8_01->setUsefullClass1(test8_02->getIdentifier());
     91    test8_01->setUsefullClass2(Class(Test2));
     92    test8_01->setUsefullClassOfTypeTest3(Class(Test3));
     93    test8_01->setUsefullClassOfTypeTest3(test8_03->getIdentifier());
     94
     95
     96    testandcout(test8_01->isA(Class(Test1)));
     97    testandcout(test8_01->isA(Class(Test2)));
     98    testandcout(test8_01->isA(Class(Test3)));
     99
     100    Test2* test8_04 = new Test2;
     101    testandcout(test8_02->isA(Class(Test1)));
     102    testandcout(test8_02->isA(Class(Test2)));
     103    testandcout(test8_02->isA(Class(Test3)));
     104
     105    Test3* test8_05 = new Test3;
     106    testandcout(test8_03->isA(Class(Test1)));
     107    testandcout(test8_03->isA(Class(Test2)));
     108    testandcout(test8_03->isA(Class(Test3)));
     109
     110    delete test8_01;
     111    delete test8_02;
     112    delete test8_03;
     113
     114#endif
    62115    return 0;
    63116  }
Note: See TracChangeset for help on using the changeset viewer.