pub fn tick(&mut self) {
        // Move the bullet
        self.x          += self.vel_x;
        self.y          += self.vel_y;
        self.time_left  -= 1;

        // Clip to the play area
        if self.x < 0.0 { self.x = 1000.0 };
        if self.y < 0.0 { self.y = 1000.0 };

        if self.x > 1000.0 { self.x = 0.0 };
        if self.y > 1000.0 { self.y = 0.0 };
    }
///
/// Updates the bullet state after a tick
///
Updates the bullet state after a tick
Updates the bullet state after a tick
pub fn tick(&mut self) {
        // Move the bullet
        self.x          += self.vel_x;
        self.y          += self.vel_y;
        self.time_left  -= 1;
        // Clip to the play area
        if self.x < 0.0 { self.x = 1000.0 };
        if self.y < 0.0 { self.y = 1000.0 };
        if self.x > 1000.0 { self.x = 0.0 };
        if self.y > 1000.0 { self.y = 0.0 };
    }
pub fn tick ( & mut self ) { // Move the bullet self . x += self . vel_x ; self . y += self . vel_y ; self . time_left -= 1 ; // Clip to the play area if self . x < 0.0 { self . x = 1000.0 } ; if self . y < 0.0 { self . y = 1000.0 } ; if self . x > 1000.0 { self . x = 0.0 } ; if self . y > 1000.0 { self . y = 0.0 } ; }
Updates the bullet state after a tick
Updates the bullet state after a tick
&mut self