Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 7, 2005, 3:54:49 PM (19 years ago)
Author:
chris
Message:

orxonox/branches/levelloader: Merged trunk into branch… still not working though…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelloader/src/world_entities/weapon.cc

    r3605 r3746  
    2121#include "world_entity.h"
    2222#include "vector.h"
    23 #include "objModel.h"
     23#include "model.h"
    2424#include "projectile.h"
     25#include "list.h"
     26#include "world.h"
    2527
    2628using namespace std;
     
    3234   creates a new weapon
    3335*/
    34 Weapon::Weapon () : WorldEntity()
    35 {}
     36Weapon::Weapon (PNode* parent, Vector* coordinate, Quaternion* direction)
     37  : WorldEntity()
     38{
     39  parent->addChild(this, PNODE_ROTATE_AND_MOVE);
     40  this->setRelCoor(coordinate);
     41  this->setRelDir(direction);
     42  WorldInterface* wi = WorldInterface::getInstance();
     43  this->worldEntities = wi->getEntityList();
     44}
    3645
    3746
     
    145154*/
    146155void Weapon::setWeaponIdleTime(float time)
    147 {}
     156{
     157  this->idleTime = time;
     158}
    148159
    149160/**
     
    155166*/
    156167float Weapon::getWeaponIdleTime(void)
    157 {}
     168{
     169  return this->idleTime;
     170}
    158171
    159172/**
     
    165178*/
    166179bool Weapon::hasWeaponIdleTimeElapsed(void)
    167 {}
     180{
     181  return (this->localTime>this->idleTime)?true:false;
     182}
    168183
    169184
Note: See TracChangeset for help on using the changeset viewer.