Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 30, 2017, 2:33:33 PM (7 years ago)
Author:
merholzl
Message:

final XMLPort things. Changes in spaceshipFlappyOrx

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrxShip.cc

    r11509 r11514  
    4949        RegisterObject(FlappyOrxShip);
    5050
    51         UpwardThrust = 250;
    52         speed = 50;
    53         gravity = 20;
    54          void AutonomousDrone::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     51        this->UpwardThrust = 1;
     52        this->speed = 1;orxout() << "constr speed set: " << 1 << endl;
     53        this->gravity = 1;
     54       
     55    }
     56    void FlappyOrxShip::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    5557        {   
    56             SUPER(AutonomousDrone, XMLPort, xmlelement, mode);
     58            SUPER(FlappyOrxShip, XMLPort, xmlelement, mode);
    5759            XMLPortParam(FlappyOrxShip, "speed", setSpeed, getSpeed, xmlelement, mode);
    5860            XMLPortParam(FlappyOrxShip, "UpwardThrust", setUpwardThrust, getUpwardThrust, xmlelement, mode);
    5961            XMLPortParam(FlappyOrxShip, "gravity", setGravity, getGravity, xmlelement, mode);
    60         }
    6162    }
     63
    6264    void FlappyOrxShip::tick(float dt)
    63     {  //Execute movement
     65    {
     66        SUPER(FlappyOrxShip, tick, dt);
     67        //Execute movement
    6468        if (this->hasLocalController())
    6569        {
     
    7276            }
    7377
    74            
    7578            pos += Vector3(speed + velocity.x, 0, velocity.y) * dt;
    7679           
     
    100103           
    101104        }
    102 
    103 
    104         SUPER(FlappyOrxShip, tick, dt);
    105105    }
    106106
Note: See TracChangeset for help on using the changeset viewer.