Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12380


Ignore:
Timestamp:
May 16, 2019, 3:10:44 PM (5 weeks ago)
Author:
rueegseb
Message:

laser appears after five pointsphere are eaten

Location:
code/branches/3DPacman_FS19
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/3DPacman_FS19/data/levels/3DPacman.oxw

    r12375 r12380  
    8888<!-- POINTS first Line -->
    8989
    90 <PacmanLaser position="-215,10,245">
    91     <attached>
    92         <Model position="0, 60,-40" yaw="90" pitch="-90" roll="0" scale3D="1, 1, 10" mesh="LaserBeam2.mesh" />
     90<PacmanLaser position="20,-200,150">
     91    <attached>
     92        <Model position="0, 0, 0" yaw="90" pitch="-90" roll="0" scale3D="1, 1, 10" mesh="LaserBeam2.mesh" />
    9393    </attached>
    9494</PacmanLaser>
  • code/branches/3DPacman_FS19/src/modules/pacman/CMakeLists.txt

    r12320 r12380  
    1111  PacmanBrown.cc
    1212  PacmanCyan.cc
     13  PacmanLaser.cpp
    1314)
    1415
  • code/branches/3DPacman_FS19/src/modules/pacman/Pacman.cc

    r12365 r12380  
    8888            dead(dt);
    8989
    90             if(point > 230){
     90
     91         
     92        }
     93
     94        //ingame loop
     95        else{
     96            if(point > 5){
    9197             
    9298                for(PacmanPointSphere* pointer : ObjectList<PacmanPointSphere>()){
    93                     pointSpherePosition = pointer->getPosition();
     99                    Vector3 pointSpherePosition = pointer->getPosition();
    94100
    95101                     if(pointSpherePosition.y > 0){
    96                         PacmanLaser* pos = ObjectList<PacmanLaser>(); //to do
     102
     103                        PacmanLaser* pos = *(ObjectList<PacmanLaser>().begin());
    97104                        pos->setPosition(pointSpherePosition);
     105                        orxout()<<"hellooooo" <<endl;
    98106                        break;
    99107                    }
     
    103111
    104112            }
    105          
    106         }
    107 
    108         //ingame loop
    109         else{
    110113
    111114            //Register ghosts
     
    223226    void Pacman::takePoint(PacmanPointSphere* taken){
    224227        ++point;
    225         }
     228       
    226229        if(point == totallevelpoint){
    227230            this->levelUp();
  • code/branches/3DPacman_FS19/src/modules/pacman/PacmanLaser.cpp

    r12365 r12380  
    1616    PacmanLaser::PacmanLaser(Context* context) : ControllableEntity(context)
    1717    {
    18         RegisterObject(PacmanPointSphere);
     18        RegisterObject(PacmanLaser);
    1919        this->setCollisionType(CollisionType::None);
    2020    }
     
    3333        Method for creating a AutonomousDrone through XML.
    3434    */
    35     void PacmanPointSphere::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     35    void PacmanLaser::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    3636    {
    37         SUPER(PacmanPointSphere, XMLPort, xmlelement, mode);
     37        SUPER(PacmanLaser, XMLPort, xmlelement, mode);
    3838    }
    3939
     
    4141    void PacmanLaser::tick(float dt)
    4242    {
    43         SUPER(PacmanPointSphere, tick, dt);
     43        SUPER(PacmanLaser, tick, dt);
    4444    }
    4545
  • code/branches/3DPacman_FS19/src/modules/pacman/PacmanLaser.h

    r12365 r12380  
    1818            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating an AutonomousDrone through XML.
    1919            virtual void tick(float dt); //!< Defines which actions the AutonomousDrone has to take in each tick.
    20 
     20           
     21            void resetPacmanLaser();
    2122           
    2223
  • code/branches/3DPacman_FS19/src/modules/pacman/PacmanPointSphere.cc

    r12365 r12380  
    8282      return false;
    8383    }
    84     bool showLaserPointSphere = false;
    85 
    86 
    87    
    88 
    8984    //Reset position
    9085    void PacmanPointSphere::resetPacmanPointSphere(){
Note: See TracChangeset for help on using the changeset viewer.