Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 31, 2018, 11:27:04 AM (6 years ago)
Author:
kunzro
Message:

XML and CMake updated, Gameboard is working

Location:
code/branches/wagnis_HS18
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/wagnis_HS18/data/levels/Wagnis.oxw

    r12052 r12067  
    1212?>
    1313
    14 <?lua
    15   include("templates/spaceshipEscort.oxt")
    16 ?>
    17 
     14<!--
    1815<Template name=pongbatcameras defaults=0>
    1916  <PongBat>
     
    3128    <attached>
    3229      <Model position="0,0,3" mesh="cube.mesh" scale3D="14,2,2" />
    33       <!--Model roll=180 mesh="pongbat.mesh" scale=0.045 /-->
     30      <-Model roll=180 mesh="pongbat.mesh" scale=0.045 /->
    3431    </attached>
    3532  </PongBat>
    36 </Template>
     33</Template> -->
    3734
    38 <Level>
    39   gametype =
     35
     36<Level plugins="wagnis" gametype="Deathmatch">
    4037  <templates>
    4138    <Template link=lodtemplate_default />
     
    5148    <SpawnPoint position="100, 45, 75" lookat="0, 45, 75" />
    5249
     50<WagnisGameboard position="0,0,0">
     51 <Provinces>
     52    <WagnisProvince ID="1" continent="1" position="0,30,30" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
     53      <attached>
     54        <Model position="0,0,0" mesh="ast1.mesh" scale3D="2,2,2" />
     55      </attached>
     56    </WagnisProvince>
     57
     58    <WagnisProvince ID="2" continent="1" position="0,40,30" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
     59      <attached>
     60        <Model position="0,0,0" mesh="ast1.mesh" scale3D="2,2,2" />
     61      </attached>
     62    </WagnisProvince>
    5363
    5464
    5565
    56 <MovableEntity position="0,0,0" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
     66
     67
     68  </Provinces>
     69</WagnisGameboard>
     70
     71<!-->
     72  <WagnisProvince ID="1" continent="1" position="0,30,30" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
    5773    <attached>
    58         <Model position="0,0,0" mesh="ast1.mesh" scale3D="2,2,2" />
     74      <Model position="0,0,0" mesh="ast1.mesh" scale3D="2,2,2" />
    5975    </attached>
    60 </MovableEntity>
     76 </WagnisProvince>
    6177
    62 <MovableEntity position="0,0,10" rotationrate="26" rotationaxis="0,2,1">
     78  <WagnisProvince ID="1" continent="1" position="0,43,33" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
    6379    <attached>
    64         <Model position="0,0,0" mesh="ast2.mesh" scale3D="2,2,2" />
     80      <Model position="0,0,0" mesh="ast1.mesh" scale3D="2,2,2" />
    6581    </attached>
    66 </MovableEntity>
     82  </WagnisProvince>
    6783
    68 <MovableEntity position="0,10,0" rotationrate="44" rotationaxis="3,1,1">
     84  <WagnisProvince ID="1" continent="1" position="0,22,28" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
    6985    <attached>
    70         <Model position="0,0,0" mesh="ast3.mesh" scale3D="2,2,2" />
     86      <Model position="0,0,0" mesh="ast1.mesh" scale3D="2,2,2" />
    7187    </attached>
    72 </MovableEntity>
     88  </WagnisProvince>
    7389
    74 <MovableEntity position="0,10,10" rotationrate="10" rotationaxis="2,9,1">
     90  <WagnisProvince ID="1" continent="1" position="0,41,22" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
    7591    <attached>
    76         <Model position="0,0,0" mesh="ast4.mesh" scale3D="2,2,2" />
     92      <Model position="0,0,0" mesh="ast1.mesh" scale3D="2,2,2" />
    7793    </attached>
    78 </MovableEntity>
    79 
    80 <MovableEntity position="0,20,10" rotationrate="20" rotationaxis="5,2,1">
    81     <attached>
    82         <Model position="0,0,0" mesh="ast5.mesh" scale3D="2,2,2" />
    83     </attached>
    84 </MovableEntity>
     94  </WagnisProvince>
     95  -->
    8596
    8697<Model position="0,0,0" mesh="Coordinates.mesh" scale="20"/>
    87 
    8898
    8999
  • code/branches/wagnis_HS18/src/modules/wagnis/WagnisGameboard.cc

    r12051 r12067  
    1 
    2 
    3 
    4 
    5 
    6 
    71#include "WagnisGameboard.h"
    82#include "core/CoreIncludes.h"
     
    2923    //XML Port
    3024    void WagnisGameboard::XMLPort(Element& xmlelement,XMLPort::Mode mode){
     25        SUPER(WagnisGameboard, XMLPort, xmlelement, mode);
    3126
    32         XMLPortObject(WagnisGameboard, WagnisProvince, "Province", addProvince, getProvince, xmlelement, mode);
     27        XMLPortObject(WagnisGameboard, WagnisProvince, "Provinces", addProvince, getProvince, xmlelement, mode);
    3328    }
    3429    //XML add province
    3530    //Adds a Province to the Gameboard
    3631    void WagnisGameboard::addProvince(WagnisProvince* province){
     32        orxout() << "added" << endl;
     33        orxout() << province->getID() << endl;
    3734        this->provs.push_back(province);
    3835    }
  • code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.cc

    r12051 r12067  
    1 
    2 
    3 
    4 
    5 
    6 
    71#include "WagnisProvince.h"
    82#include "core/CoreIncludes.h"
     
    3024    //XML Port
    3125    void WagnisProvince::XMLPort(Element& xmlelement,XMLPort::Mode mode){
     26        SUPER(WagnisProvince, XMLPort, xmlelement, mode);
     27
    3228        XMLPortParam(WagnisProvince, "ID", setID, getID, xmlelement, mode);
    3329        XMLPortParam(WagnisProvince, "continent", setContinent, getContinent, xmlelement, mode);
  • code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.h

    r12051 r12067  
    77#define Wagnis_Province_h
    88
    9 #include "OrxonoxPrereqs.h"
     9#include "WagnisPrereqs.h"
    1010#include "core/CoreIncludes.h"
    1111#include "core/XMLPort.h"
     
    1616namespace orxonox
    1717{
    18     class WagnisProvince : public MovableEntity
     18    class _WagnisExport WagnisProvince : public MovableEntity
    1919    {
    2020    public:
Note: See TracChangeset for help on using the changeset viewer.