Changeset 11614 for code/branches/Asteroid_HS17
- Timestamp:
- Dec 1, 2017, 6:38:00 PM (7 years ago)
- Location:
- code/branches/Asteroid_HS17
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Asteroid_HS17/data/levels/Asteroids2D.oxw
r11608 r11614 45 45 <SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass= Asteroids2DShip pawndesign=spaceshipasteroids2d /> 46 46 47 <Model mesh="axes.mesh" scale=10 position="0,0,0" /> 47 <!--<Model mesh="axes.mesh" scale=10 position="0,0,0" /> --> 48 49 50 <?lua 51 for i = 1, 250, 1 52 do 53 j = math.random() 54 ?> 55 56 <MovableEntity 57 position = "<?lua print(math.random()* 15000 - 1000) ?>,<?lua print(math.random() * 12000 - 4000) ?>,<?lua print(math.random() * 12000 - 4000) ?>" 58 collisionType = dynamic 59 linearDamping = 0.8 60 angularDamping = 0 61 scale = "<?lua print(j * 150)?>" 62 collisiondamage = 1 63 enablecollisiondamage = true 64 > 65 <attached> 66 <Model mass="<?lua print(j * 1000) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" /> 67 </attached> 68 <collisionShapes> 69 <SphereCollisionShape radius="<?lua print(j * 350) ?>" /> 70 </collisionShapes> 71 </MovableEntity> 72 73 <?lua 74 end 75 ?> 76 77 48 78 <Asteroids2DCenterPoint name=asteroids2Dcenter /> 49 79 -
code/branches/Asteroid_HS17/data/levels/templates/spaceshipAsteroids2D.oxt
r11613 r11614 20 20 primaryThrust = 150 21 21 auxilaryThrust = 30 22 rotationThrust = 50022 rotationThrust = 100 23 23 24 24 lift = 1; … … 85 85 <CameraPosition position="0,1300,-100" direction="0, -1, 0" drag=false mouselook=true /> 86 86 --> 87 <CameraPosition position="0,600,0" pitch=-90 absolute=true />87 <CameraPosition position="0,600,0" pitch=-90 absolute=true drag = false mouselook=true/> 88 88 <CameraPosition position="0,50,160" drag=true mouselook=true /> 89 89 <CameraPosition position="0,40,125" drag=true mouselook=true /> -
code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DCube.cc
r11593 r11614 34 34 #include "Asteroids2D.h" 35 35 #include "core/CoreIncludes.h" 36 #include "util/Math.h" 36 37 37 38 namespace orxonox … … 39 40 RegisterClass(Asteroids2DCube); 40 41 41 Asteroids2DCube::Asteroids2DCube(Context* context) : MovableEntity(context)42 Asteroids2DCube::Asteroids2DCube(Context* context) : Pawn(context) 42 43 { 43 44 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 44 57 } 45 58 -
code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DCube.h
r11593 r11614 38 38 #include "asteroids2D/Asteroids2DPrereqs.h" 39 39 40 #include "worldentities/ MovableEntity.h"40 #include "worldentities/pawns/Pawn.h" 41 41 42 42 43 43 namespace orxonox 44 44 { 45 class _Asteroids2DExport Asteroids2DCube : public MovableEntity45 class _Asteroids2DExport Asteroids2DCube : public Pawn 46 46 { 47 47 public: 48 48 Asteroids2DCube(Context* context); 49 virtual void tick(float dt) override; 49 50 50 51 private: 52 int size; // three sizes, 3-> two 2s, 2-> two 1s, 1-> die 53 float width, height; //field 51 54 }; 52 55 } -
code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.h
r11613 r11614 65 65 66 66 //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. 68 68 virtual void rotatePitch(const Vector2& value) override{}; // Rotate in pitch direction. 69 69 virtual void rotateRoll(const Vector2& value) override{}; // Rotate in roll direction.
Note: See TracChangeset
for help on using the changeset viewer.