- Timestamp:
- May 17, 2019, 3:00:54 PM (6 years ago)
- Location:
- code/branches/Boxhead_FS19
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Boxhead_FS19/data/levels/Hover.oxw
r12390 r12397 75 75 <SpawnPoint 76 76 team=0 77 position="50 ,20,50"77 position="500,20,50" 78 78 lookat="100,20,100" 79 79 spawnclass=HoverShip … … 87 87 </SpaceShip> 88 88 89 <SpaceShip position="500,10000,500" lookat="50,20,50" name="enemy" health="200" maxhealth="200" initialhealth="200" > 90 <templates> 91 <Template link=spaceshipzombie /> 92 </templates> 93 </SpaceShip> 94 89 95 90 96 -
code/branches/Boxhead_FS19/data/levels/scripts/ScriptableControllerSpawn.lua
r12006 r12397 105 105 106 106 107 spawn_dummy_after_timeout( 5)107 spawn_dummy_after_timeout(10) 108 108 109 109 -
code/branches/Boxhead_FS19/src/modules/hover/Hover.cc
r12390 r12397 51 51 52 52 53 53 54 namespace orxonox 54 55 { … … 64 65 this->setHUDTemplate("HoverHUD"); 65 66 } 66 // void Hover::spawnZombie(std::string id)67 // {68 // Identifier *identifier = ClassByString("SpaceShip");69 67 70 // if(!identifier)71 // {72 // orxout(user_error) << "Script tried to spawn unknown object" << std::endl;73 // return;74 // }75 76 // if(!identifier->isLoadable())77 // {78 // orxout(user_error) << "Script tried to spawn unloadable object" << std::endl;79 // return;80 // }81 82 83 // WorldEntity *entity;84 // Identifiable *obj = identifier->fabricate(this->controller_->getWorldEntityByID("Player")->getContext());85 86 87 88 // orxout(user_status) << "First hit!" << std::endl;89 90 // if(obj->isA(ClassIdentifier<WorldEntity>::getIdentifier()))91 // {92 // orxout(user_status) << "Is WorldEntity!" << std::endl;93 // entity = orxonox_cast<WorldEntity*>(obj);94 // }95 // else if(obj->isA(ClassIdentifier<PlayerInfo>::getIdentifier()))96 // {97 // // TODO This does not work yet because somehow the controllable entity is not set98 // // yet at this stage.99 // // entity = orxonox_cast<PlayerInfo*>(obj)->getControllableEntity();100 101 // orxout(user_status) << "Is PlayerInfo!" << std::endl;102 103 // //use TEMPLATES in the map to define objects that are not present on the map yet104 // return;105 // }106 // else107 // {108 // orxout(user_warning) << "Script tried to spawn an object that is neither a WorldEntity, nor a PlayerInfo" << std::endl;109 110 // return;111 // }112 113 // if(entity->isA(ClassIdentifier<MobileEntity>::getIdentifier())) {114 // orxout(user_status) << "Is MobileEntity!" << std::endl;115 // this->controller_->registerMobileEntity(id, orxonox_cast<MobileEntity*>(entity));116 // }117 118 119 120 // if(entity->isA(ClassIdentifier<Pawn>::getIdentifier())) {121 // orxout(user_status) << "Is Pawn!" << std::endl;122 // this->controller_->registerPawn(id, orxonox_cast<Pawn*>(entity));123 // }124 125 // this->controller_->registerWorldEntity(id, orxonox_cast<WorldEntity*>(entity));126 127 128 // ///////////////GOLD!!!!!!!!!!!!!!!////////////////////////129 // Pawn* pawn = this->controller_->getPawnByID(id);130 131 // //Attach to pawn132 // SpaceShip* drone = new SpaceShip(pawn->getContext()); // this is neccessary because the projectiles fired need a valid creator for the particlespawner (when colliding against something)133 134 // drone->addTemplate("spaceshipzombie"); //ScriptableControllerDroneTemplate spaceshipescort135 136 // Vector3 spawnPosition = pawn->getWorldPosition() + Vector3(500,20,500);137 // drone->setPosition(spawnPosition);138 // }139 68 140 69 void Hover::tick(float dt) … … 203 132 204 133 //Spawn Zombies 205 //spawnZombie( z1);134 //spawnZombie(1); 206 135 207 136 -
code/branches/Boxhead_FS19/src/modules/hover/HoverShip.cc
r12358 r12397 48 48 } 49 49 50 // //moves slightly right and left, that zombieship approaches 51 // void HoverShip::leftright(const Vector2& value) 52 // { 53 // this->steering_.z += 5; 54 // this->steering_.z -= 5; 55 // } 56 50 57 void HoverShip::moveFrontBack(const Vector2& value) 51 58 { this->steering_.z -= value.x; } 52 59 53 60 void HoverShip::moveRightLeft(const Vector2& value) 54 { this->steering_.x += value.x; } 61 { this->steering_.x += value.x; 62 // value.x += 0.001; 63 // value.x -= 0.001; 64 } 55 65 56 66 void HoverShip::moveUpDown(const Vector2& value) -
code/branches/Boxhead_FS19/src/modules/hover/HoverShip.h
r11495 r12397 53 53 { return this->jumpBoost_; } 54 54 55 /////moves slightly right and left, that zombieship approaches 56 // virtual void leftright(const Vector2& value); 57 55 58 virtual void moveFrontBack(const Vector2& value) override; 56 59
Note: See TracChangeset
for help on using the changeset viewer.