src/Player.hh
changeset 300 417183866f35
parent 296 4d3ebaa29430
child 302 e734d8e9bbb5
equal deleted inserted replaced
299:e4dacf550ba1 300:417183866f35
    38     Rope rope;
    38     Rope rope;
    39     
    39     
    40     /** Our current health */
    40     /** Our current health */
    41     Health health;
    41     Health health;
    42 
    42 
       
    43     /** Our respawn-timer */
       
    44     Timer respawn_timer;
       
    45     CL_Slot respawn_slot;
       
    46 
    43     // XXX: hmm... updated where?
    47     // XXX: hmm... updated where?
    44     int animation_step;
    48     int animation_step;
    45 
    49 
    46     /**
    50     /**
    47      * Default constructor for use with virtual inheritance... it's not defined, and must not be called
    51      * Default constructor for use with virtual inheritance... it's not defined, and must not be called
    55 
    59 
    56     /**
    60     /**
    57      * Remove player from state players list
    61      * Remove player from state players list
    58      */
    62      */
    59     ~Player (void);
    63     ~Player (void);
       
    64     
       
    65     /**
       
    66      * Move the worm to the given position, removeGround to dig a hole there, and enable ourselves
       
    67      */
       
    68     virtual void spawn (Vector position);
       
    69 
       
    70     /**
       
    71      * We die. Disable and prepare respawn_timer
       
    72      */
       
    73     virtual void die (void);
       
    74 
       
    75     /**
       
    76      * Calculate a new position for the worm, and respawn there. Also set health back to 100%
       
    77      */
       
    78     void respawn (TimeMS dt);
    60 
    79 
    61     /**
    80     /**
    62      *  Used by the network code to execute various actions
    81      *  Used by the network code to execute various actions
    63      */
    82      */
    64     virtual void handleDig (Vector position, float radius);
    83     virtual void handleDig (Vector position, float radius);