Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 21, 2013, 3:53:13 PM (11 years ago)
Author:
zifloria
Message:

InvaderShip created

Location:
code/branches/invaders
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/invaders/data/levels/Invaders.oxw

    r9701 r9709  
    3030
    3131    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
    32     <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipinvader />
     32    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=InvaderShip pawndesign=spaceshipinvader />
     33
     34    <InvaderCenterPoint name=invadercenter />
    3335   
    3436  </Scene>
  • code/branches/invaders/data/levels/templates/spaceshipInvader.oxt

    r9701 r9709  
    11<Template name=spaceshipinvader>
    2   <SpaceShip
     2  <InvaderShip
    33   hudtemplate            = spaceshiphud
    44   camerapositiontemplate = spaceshipescortcameras
     
    5959  include("../includes/weaponSettingsEscort.oxi")
    6060?>
    61   </SpaceShip>
     61  </InvaderShip>
    6262</Template>
    6363
    6464<Template name=spaceshipescortcameras defaults=0>
    65   <SpaceShip>
     65  <InvaderShip>
    6666    <camerapositions>
    67       <CameraPosition position="0,15, 60" drag=true mouselook=true />
     67<!--       <CameraPosition position="0,15, 60" drag=true mouselook=true />
    6868      <CameraPosition position="0,20, 90" drag=true mouselook=true />
    69       <CameraPosition position="0,30,120" drag=true mouselook=true />
     69      <CameraPosition position="0,30,120" drag=true mouselook=true /> -->
    7070      <CameraPosition position="0,300,-100" direction="0, -1, 0" drag=true mouselook=true />
    7171    </camerapositions>
    72   </SpaceShip>
     72  </InvaderShip>
    7373</Template>
    7474
  • code/branches/invaders/src/modules/invader/CMakeLists.txt

    r9702 r9709  
    22BUILD_UNIT InvaderBuildUnit.cc
    33  Invader.cc
     4  InvaderCenterPoint.cc
     5  InvaderShip.cc
    46END_BUILD_UNIT
    57)
  • code/branches/invaders/src/modules/invader/Invader.cc

    r9702 r9709  
    4242#include "chat/ChatManager.h"
    4343
     44#include "InvaderShip.h"
     45// ! HACK
     46#include "infos/PlayerInfo.h"
     47
     48#include "InvaderCenterPoint.h"
     49
    4450namespace orxonox
    4551{
     
    5056        RegisterObject(Invader);
    5157
     58        this->center_ = 0;
     59        //this->context = context;
    5260    }
    5361
     
    5664    }
    5765
     66    // inject custom player controller
     67 /**   void Invader::spawnPlayer(PlayerInfo* player)
     68    {
     69        assert(player);
     70
     71        //player->startControl(new InvaderShip(this->center_->getContext() ) );
     72    }*/
     73
    5874    void Invader::start()
    5975    {
     
    6177        this->bForceSpawn_ = true;
    6278
     79        if (this->center_ == NULL)  // abandon mission!
     80        {
     81            orxout(internal_error) << "Invader: No Centerpoint specified." << endl;
     82            GSLevel::startMainMenu();
     83            return;
     84        }
    6385        // Call start for the parent class.
    6486        Deathmatch::start();
  • code/branches/invaders/src/modules/invader/Invader.h

    r9702 r9709  
    4040#include "gametypes/Deathmatch.h"
    4141
     42#include "InvaderCenterPoint.h"
     43
    4244namespace orxonox
    4345{
     
    5153            virtual void start(); //!< Starts the Invader minigame.
    5254            virtual void end(); ///!< Ends the Invader minigame.
     55
     56            //virtual void spawnPlayer(PlayerInfo* player); //!< Spawns the input player.
     57
     58            void setCenterpoint(InvaderCenterPoint* center)
     59            { this->center_ = center; }
     60        private:
     61            WeakPtr<InvaderCenterPoint> center_;
     62            //Context* context;
    5363    };
    5464}
  • code/branches/invaders/src/modules/invader/InvaderPrereqs.h

    r9702 r9709  
    6969{
    7070    class Invader;
     71    class InvaderCenterPoint;
     72    class InvaderShip;
    7173}
    7274
Note: See TracChangeset for help on using the changeset viewer.