Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 23, 2015, 3:44:31 PM (9 years ago)
Author:
holzerj
Message:

Added Mine, ice particle, rocketfire, psygun

Location:
code/branches/particleEffectsHS15
Files:
7 added
11 edited

Legend:

Unmodified
Added
Removed
  • code/branches/particleEffectsHS15/data/levels/emptyLevel.oxw

    r10706 r10836  
    3434    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
    3535
    36     <ParticleEmitter
    37         source="Orxonox/engine"
    38         position="0,0,0"
    39         lifetime=1.0 loop=1 startdelay=2.0
    40     />
    41         <ParticleEmitter
    42         source="Orxonox/ice"
    43         position="0,0,100"
    44         lifetime=2.0 loop=1 startdelay=3.0
    45     />
     36        <Pawn team=1 health=30 position="0,100,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 4" >
     37        <events>
     38          <visibility>
     39            <EventListener event="flying4" />
     40          </visibility>
     41        </events>
     42        <attached>
     43            <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
     44        </attached>
     45        <collisionShapes>
     46            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
     47        </collisionShapes>
     48    </Pawn>
     49
     50    <Pawn team=1 health=30 position="0,200,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 3">
     51        <events>
     52          <visibility>
     53            <EventListener event="flying4" />
     54          </visibility>
     55        </events>
     56        <attached>
     57           <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
     58        </attached>
     59        <collisionShapes>
     60            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
     61        </collisionShapes>
     62    </Pawn>
    4663   
    4764  </Scene>
  • code/branches/particleEffectsHS15/data/levels/includes/weaponSettingsAssff2.oxi

    r8706 r10836  
    1     <weaponslots>
     1t    <weaponslots>
    22      <WeaponSlot position="-15.0,-1.5,0" />
    33      <WeaponSlot position=" 15.0,-1.5,0" />
  • code/branches/particleEffectsHS15/data/levels/includes/weaponSettingsEscort.oxi

    r9763 r10836  
    1414        </links>
    1515        <Weapon>
    16           <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" projectileMesh="LaserBeam2.mesh" />
    17           <!--HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" projectileMesh="LaserBeam2.mesh" /-->
     16          <MineGun mode=0 munitionpershot=0 delay=0.125 damage=9.3 muzzleoffset=" 0.1, 1.4,-3" />
    1817        </Weapon>
    1918        <Weapon>
    20           <HsW01 mode=0 munitionpershot=0 delay=0     damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" projectileMesh="LaserBeam2.mesh" />
    21           <!--HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" projectileMesh="LaserBeam2.mesh" /-->
     19          <SplitGun mode=0 munitionpershot=0 delay=0.125 damage=9.3 muzzleoffset=" 0.1, 1.4,-3" />
    2220        </Weapon>
    2321      </WeaponPack>
  • code/branches/particleEffectsHS15/data/levels/templates/spaceshipEscort.oxt

    r10706 r10836  
    9292    <EffectContainer condition="idle">
    9393      <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" looping=1 active=false/>
     94       />
     95
     96           <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, -2, 14" colour="0.2, 0.5, 0.65, 1.0" width=150 length=15 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=2 turnofftime=1 material="Flares/ThrusterFlare1" />
     97
     98      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, -2, 14" colour="0.2, 0.5, 0.65, 1.0" width=15 length=15 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=2 turnofftime=1 material="Flares/ThrusterFlare1" />
     99
    94100    </EffectContainer>
    95101    <EffectContainer condition="not idle">
     102      <FadingBillboard mainstate=activity active=false scale=0.09 position="12, -2, 13" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
     103      <FadingBillboard mainstate=activity active=false scale=0.09 position="-12, -2, 13" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
    96104    </EffectContainer>
    97105    <EffectContainer condition="normal or brake">
    98106
    99107    </EffectContainer>
     108
    100109    <EffectContainer condition="normal or boost">
    101       <ParticleEmitter
    102         source="Orxonox/engine"
    103         position="-12,-1.75,13"
    104         lifetime=5.0 loop=1 startdelay=0.0
    105         scale=0.3
    106     />
    107         <ParticleEmitter
    108         source="Orxonox/engine"
    109         position="12,-1.75,13"
    110         lifetime=5.0 loop=1 startdelay=0.0
    111         scale=0.3
    112     />
    113      
     110       
     111       
     112      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, -2, 14" colour="0.2, 1.0, 0.65, 1.0" width=5 length=1500 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
     113
     114      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, -2, 14" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
    114115    </EffectContainer>
     116
    115117    <EffectContainer condition="boost">
    116118      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, 0, 10" colour="0.6, 0.8, 0.75, 0.7" width=25 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
  • code/branches/particleEffectsHS15/data/particle/ice.particle

    r10671 r10836  
    11particle_system Orxonox/ice
    22{
    3         material PE/Hidden.001
    4         particle_width 66.6699981689453
    5         particle_height 38.0999984741211
     3        material PE/iceCrystal
     4        particle_width 5
     5        particle_height 5
    66        quota 7000
    77        cull_each false
     
    1818        emitter Box
    1919        {
    20                 position 0.0 500.0 0.0
    21                 direction 0.0 0.0 1.0
    22                 angle 0
    23                 width 200
    24                 height 200
    25                 depth 200
    26                 emission_rate 20
     20                position 0.0 0.0 0.0
     21                direction 1.0 1.0 1.0
     22                angle 45
     23                width 20
     24                height 20
     25                depth 20
     26                emission_rate 200
    2727                velocity_min 1
    2828                velocity_max 1
    29                 time_to_live_min 10
    30                 time_to_live_max 20
     29                time_to_live_min 3
     30                time_to_live_max 6
    3131                duration_min 0
    3232                duration_max 0
     
    3434                repeat_delay_max 0
    3535                colour_range_start 1 1 1 1
    36                 colour_range_end 0.835294 0.956863 1 1
     36                colour_range_end 0.9 1 1 1
    3737        }
    3838
  • code/branches/particleEffectsHS15/data/particle/rocketfire.particle

    r10671 r10836  
    11particle_system Orxonox/rocketfire
    22{
    3         material PE/Special.001
    4         particle_width 6.67000007629395
    5         particle_height 3.80999994277954
    6         quota 300
    7         cull_each false
    8         sorted false
    9         local_space false
     3        material PE/glowEffect
     4        particle_width 2
     5        particle_height 2
     6        quota 10000
     7        cull_each true
     8        sorted true
     9        local_space true
    1010        iteration_interval 0.0
    1111        nonvisible_update_timeout 0.0
     
    1818        emitter Ellipsoid
    1919        {
    20                 position 0.0 0.0 3.0
     20                position 0.05 0.0 2.0
    2121                direction 0.0 0.0 1.0
    2222                angle 0
     
    2626                emission_rate 1200
    2727                velocity_min 10
    28                 velocity_max 48
     28                velocity_max 20
    2929                time_to_live_min 0.1
    30                 time_to_live_max 0.19
     30                time_to_live_max 0.1
    3131                duration_min 0
    3232                duration_max 0
     
    3636                colour_range_end 1 0 0 1
    3737        }
     38        emitter Ellipsoid
     39        {
     40                position 0.05 0.0 2.0
     41                direction 0.0 0.0 1.0
     42                angle 0
     43                width 0
     44                height 0
     45                depth 0
     46                emission_rate 100
     47                velocity_min 5
     48                velocity_max 10
     49                time_to_live_min 0.1
     50                time_to_live_max 0.1
     51                duration_min 0
     52                duration_max 0
     53                repeat_delay_min 0
     54                repeat_delay_max 0
     55                colour_range_start 0.2 0.5 0.65
     56                colour_range_end 0.25 0.55 0.7
     57        }
    3858
    3959        affector Scaler
  • code/branches/particleEffectsHS15/src/modules/weapons/munitions/CMakeLists.txt

    r10629 r10836  
    77  IceMunition.cc
    88  SplitMunition.cc
     9  MineMunition.cc
    910)
  • code/branches/particleEffectsHS15/src/modules/weapons/projectiles/CMakeLists.txt

    r10629 r10836  
    1212  GravityBomb.cc
    1313  GravityBombField.cc
     14  MineProjectile.cc
    1415)
  • code/branches/particleEffectsHS15/src/modules/weapons/projectiles/IceGunProjectile.cc

    r10629 r10836  
    3434#include "IceGunProjectile.h"
    3535
     36#include <OgreSceneManager.h>
     37#include <OgreSceneNode.h>
     38
    3639#include "core/CoreIncludes.h"
    3740#include "graphics/Model.h"
     41#include "graphics/ParticleSpawner.h"
     42#include "Scene.h"
     43#include "core/command/Executor.h"
     44#include "tools/ParticleInterface.h"
    3845
    3946namespace orxonox
     
    5562        this->attach(model);
    5663        model->setPosition(Vector3(0,0,0));
     64
     65        // Add effect.
     66        emitter_ = new ParticleEmitter(this->getContext());
     67        this->attach(emitter_);
     68        emitter_->setOrientation(this->getOrientation());
     69        emitter_->setSource("Orxonox/ice");       
     70    }
     71
     72    IceGunProjectile::~IceGunProjectile()
     73    {
     74        if (this->isInitialized())
     75        {
     76            const Vector3& pos = emitter_->getWorldPosition();
     77            const Quaternion& rot = emitter_->getWorldOrientation();
     78            this->detach(emitter_);
     79            emitter_->setPosition(pos);
     80            emitter_->setOrientation(rot);
     81            emitter_->getParticleInterface()->setEnabled(false);
     82            this->getScene()->getRootSceneNode()->addChild(const_cast<Ogre::SceneNode*>(emitter_->getNode()));
     83
     84            const ExecutorPtr& executor = createExecutor(createFunctor(&ParticleEmitter::destroy, emitter_));
     85            new Timer(15, false, executor, true);
     86        }
    5787    }
    5888
  • code/branches/particleEffectsHS15/src/modules/weapons/projectiles/IceGunProjectile.h

    r10629 r10836  
    5656        public:
    5757            IceGunProjectile(Context* context);
    58             virtual ~IceGunProjectile() {}
     58            virtual ~IceGunProjectile();
    5959
    6060            virtual void setFreezeTime(float freezeTime);
     
    6363        protected:
    6464            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
    65         private:         
     65        private:
     66            ParticleEmitter* emitter_;
    6667            float freezeTime_; //The duration of the freezing effect on a target
    6768            float freezeFactor_; //The strength of the freezing effect
  • code/branches/particleEffectsHS15/src/modules/weapons/weaponmodes/CMakeLists.txt

    r10629 r10836  
    1111  SimpleRocketFire.cc
    1212  GravityBombFire.cc
     13  MineGun.cc
    1314)
Note: See TracChangeset for help on using the changeset viewer.