Changeset 9ba9b96 in network-game for common/Projectile.h


Ignore:
Timestamp:
Jan 20, 2014, 4:59:34 PM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
949cf70
Parents:
d998572
Message:

All ids should now be unsigned ints

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/Projectile.h

    rd998572 r9ba9b96  
    1313class Projectile {
    1414public:
     15   unsigned int id;
     16   POSITION pos;
     17   unsigned int target;
     18   int speed;
     19   int damage;
     20   unsigned long long timeLastUpdated;
    1521
    1622   Projectile();
     
    2026   ~Projectile();
    2127
    22    void setId(int id);
     28   void setId(unsigned int id);
    2329
    2430   void serialize(char* buffer);
    2531   void deserialize(char* buffer);
    2632
    27    // returns true if it reached the target and should be deleted
     33   // returns true if the projectile reached the target and should be deleted
    2834   bool move(map<unsigned int, Player*>& mapPlayers);
    29 
    30    /*
    31     * target should become a Player*. When this object gets serialized, the player's id should be sent.
    32     * Deserialization in this case might be tricky since it will require a playerMap to turn the id into a Plauyer*
    33     */
    34 
    35    int id;
    36    POSITION pos;
    37    int target;
    38    int speed;
    39    int damage;
    40    unsigned long long timeLastUpdated;
    4135};
    4236
Note: See TracChangeset for help on using the changeset viewer.