Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10897


Ignore:
Timestamp:
Nov 30, 2015, 3:56:38 PM (9 years ago)
Author:
landauf
Message:

register event-source

Location:
code/branches/particleEffectsHS15/src/modules/weapons/projectiles
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/particleEffectsHS15/src/modules/weapons/projectiles/MineProjectile.cc

    r10889 r10897  
    3535
    3636#include "core/CoreIncludes.h"
     37#include "core/command/Executor.h"
     38#include "core/EventIncludes.h"
    3739#include "graphics/Model.h"
    38 #include "core/command/Executor.h"
    3940
    4041namespace orxonox
     
    9596            distanceTrigger_->addTarget("Pawn");
    9697            distanceTrigger_->setStayActive(true);
     98
     99            this->addEventSource(distanceTrigger_, "explode");
    97100        }
    98101    }
     
    100103    MineProjectile::~MineProjectile()
    101104    {
    102         /*if (modelCore_ != NULL)
     105        if (this->isInitialized())
    103106        {
    104             modelCore_->destroy();
    105         }*/
    106         /*if (distanceTrigger_ != NULL)
    107         {
    108             distanceTrigger_->destroy();
    109         }*/
     107            /*if (modelCore_ != NULL)
     108            {
     109                modelCore_->destroy();
     110            }*/
     111            if (distanceTrigger_)
     112                distanceTrigger_->destroy();
     113        }
     114    }
     115
     116    void MineProjectile::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
     117    {
     118        SUPER(MineProjectile, XMLEventPort, xmlelement, mode);
     119        XMLPortEventState(MineProjectile, BaseObject, "explode", Explode, xmlelement, mode);
    110120    }
    111121
  • code/branches/particleEffectsHS15/src/modules/weapons/projectiles/MineProjectile.h

    r10889 r10897  
    5656            virtual ~MineProjectile();
    5757
     58            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
     59
    5860            virtual void setMaxTimeUntilExplosion(float maxTimeUntilExplosion);
    5961            virtual void setTimeUntilActivation(float timeUntilActivation);
Note: See TracChangeset for help on using the changeset viewer.