Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 6, 2008, 5:31:58 PM (17 years ago)
Author:
landauf
Message:

several improvements:

  • AI works properly now - add enemies with 'createEnemy x' where x is the number of enemies to add, default is 1. You can remove AI ships with 'killEnemies'.
  • Added new explosion (with smoke)
  • Added new projectile (with trail)
  • Added new thruster emitter
  • AI ships are destroyable - they start with 100 hp, each hit makes 15 hp damage, this value is configurable in the config-file: [Projectile] damage_
  • Added AI ship spawn and explosion effects
Location:
code/trunk/src/orxonox/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/tools/Timer.cc

    r1505 r1552  
    102102    TimerBase::~TimerBase()
    103103    {
    104       if (this->executor_)
    105           delete this->executor_;
     104        this->deleteExecutor();
    106105    }
    107106
     
    112111    {
    113112        (*this->executor_)();
     113    }
     114
     115    /**
     116        @brief Deletes the executor.
     117    */
     118    void TimerBase::deleteExecutor()
     119    {
     120      if (this->executor_)
     121          delete this->executor_;
    114122    }
    115123
  • code/trunk/src/orxonox/tools/Timer.h

    r1535 r1552  
    7878
    7979            void run() const;
     80            void deleteExecutor();
    8081
    8182            /** @brief Starts the Timer: Function-call after 'interval' seconds. */
     
    149150            void setTimer(float interval, bool bLoop, T* object, ExecutorMember<T>* executor)
    150151            {
     152                this->deleteExecutor();
     153
    151154                this->interval_ = interval;
    152155                this->bLoop_ = bLoop;
     
    185188            void setTimer(float interval, bool bLoop, ExecutorStatic* executor)
    186189            {
     190                this->deleteExecutor();
     191
    187192                this->interval_ = interval;
    188193                this->bLoop_ = bLoop;
Note: See TracChangeset for help on using the changeset viewer.