Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 1, 2017, 6:38:00 PM (6 years ago)
Author:
vyang
Message:

Asteroids werden random geladen→ collisionShape und Bewegung einstellen

Location:
code/branches/Asteroid_HS17/src/modules/asteroids2D
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DCube.cc

    r11593 r11614  
    3434#include "Asteroids2D.h"
    3535#include "core/CoreIncludes.h"
     36#include "util/Math.h"
    3637
    3738namespace orxonox
     
    3940    RegisterClass(Asteroids2DCube);
    4041
    41     Asteroids2DCube::Asteroids2DCube(Context* context) : MovableEntity(context)
     42    Asteroids2DCube::Asteroids2DCube(Context* context) : Pawn(context)
    4243    {
    4344        RegisterObject(Asteroids2DCube);
     45        this->size = 1;
     46        this->width = 1043;
     47        this->height = 646;
     48        //this->setPosition();
     49        //this->setVelocity(Vector3 )
     50    }
     51
     52    void Asteroids2DCube::tick(float dt)
     53    {
     54        SUPER(Asteroids2DCube, tick, dt);
     55       
     56
    4457    }
    4558
  • code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DCube.h

    r11593 r11614  
    3838#include "asteroids2D/Asteroids2DPrereqs.h"
    3939
    40 #include "worldentities/MovableEntity.h"
     40#include "worldentities/pawns/Pawn.h"
    4141
    4242
    4343namespace orxonox
    4444{
    45     class _Asteroids2DExport Asteroids2DCube : public MovableEntity
     45    class _Asteroids2DExport Asteroids2DCube : public Pawn
    4646    {
    4747       public:
    4848            Asteroids2DCube(Context* context);
     49            virtual void tick(float dt) override;
    4950
    5051       private:
     52                int size;                               // three sizes, 3-> two 2s, 2-> two 1s, 1-> die
     53                float width, height;    //field
    5154    };
    5255}
  • code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.h

    r11613 r11614  
    6565
    6666            //no rotation in x and z direction!
    67             virtual void rotateYaw(const Vector2& value) override{}; // Rotate in yaw direction.
     67            //virtual void rotateYaw(const Vector2& value) override{}; // Rotate in yaw direction.
    6868            virtual void rotatePitch(const Vector2& value) override{}; // Rotate in pitch direction.
    6969            virtual void rotateRoll(const Vector2& value) override{}; // Rotate in roll direction.
Note: See TracChangeset for help on using the changeset viewer.