Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 10, 2012, 4:51:44 PM (11 years ago)
Author:
jo
Message:

Enabling more variable projectile behaviour for HSW01

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationHS12/src/modules/weapons/weaponmodes/HsW01.cc

    r8855 r9505  
    6161        this->delay_ = 0.0f;
    6262        this->setMunitionName("LaserMunition");
     63        this->mesh_ = "laserbeam.mesh";
     64        this->sound_ = "sounds/Weapon_HsW01.ogg";
     65
    6366
    6467        this->delayTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&HsW01::shot, this)));
    6568        this->delayTimer_.stopTimer();
    6669
    67         this->setDefaultSound("sounds/Weapon_HsW01.ogg");
     70        this->setDefaultSound(this->sound_);
    6871    }
    6972
     
    7881        XMLPortParam(HsW01, "delay", setDelay, getDelay, xmlelement, mode);
    7982        XMLPortParam(HsW01, "material", setMaterial, getMaterial, xmlelement, mode);
     83        XMLPortParam(HsW01, "projectileMesh", setMesh, getMesh, xmlelement, mode);
     84        XMLPortParam(HsW01, "sound", setSound, getSound, xmlelement, mode);
    8085    }
    8186
     
    108113        Projectile* projectile = new Projectile(this);
    109114        Model* model = new Model(projectile);
    110         model->setMeshSource("laserbeam.mesh");
     115        model->setMeshSource(mesh_);
    111116        model->setCastShadows(false);
    112117        projectile->attach(model);
Note: See TracChangeset for help on using the changeset viewer.