(
pos: Vec2,
texture: Texture2D,
bullet_decoy_texture: Texture2D,
texture_explotion: Texture2D,
)
| 30 | |
| 31 | impl Player { |
| 32 | pub fn new( |
| 33 | pos: Vec2, |
| 34 | texture: Texture2D, |
| 35 | bullet_decoy_texture: Texture2D, |
| 36 | texture_explotion: Texture2D, |
| 37 | ) -> Self { |
| 38 | Player { |
| 39 | pos, |
| 40 | texture, |
| 41 | bullet_decoy_texture, |
| 42 | texture_explotion, |
| 43 | shoot_timer: 0f32, |
| 44 | collision_rect: Rect::new(pos.x, pos.y, 7.0f32, 6.0f32), |
| 45 | state: PlayerState::Normal, |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | pub fn reset(&mut self, resources: &Resources) { |
| 50 | let player_spawn_y = |
nothing calls this directly
no outgoing calls
no test coverage detected