MCPcopy Create free account

hub / github.com/drbawb/rust-story / functions

Functions86 in github.com/drbawb/rust-story

↓ 32 callersMethodto_game
(&self)
src/units/drawing.rs:19
↓ 22 callersMethodto_pixel
(&self)
src/units/drawing.rs:32
↓ 8 callersMethodget_collision_info
(&self, hitbox: &Rectangle, tile_map: &map::Map)
src/player.rs:354
↓ 8 callersMethodheight
(&self)
src/collisions.rs:32
↓ 8 callersMethodis_key_held
Responds true if key has been pressed since last call to `beginNewFrame()` but _has not yet been released._ Responds false otherwise.
src/input.rs:68
↓ 8 callersMethodleft
(&self)
src/collisions.rs:26
↓ 8 callersMethodto_tile
(&self)
src/units/drawing.rs:24
↓ 8 callersMethodtop
(&self)
src/collisions.rs:28
↓ 7 callersMethodright
(&self)
src/collisions.rs:27
↓ 6 callersMethodon_ground
The player will collide w/ the ground at y-coord `320` Gravity cannot pull them below this floor.
src/player.rs:647
↓ 6 callersMethodwidth
(&self)
src/collisions.rs:31
↓ 5 callersMethodbottom
(&self)
src/collisions.rs:29
↓ 3 callersMethodblit_surface
(&self, src: &mut render::Texture, src_rect: &rect::Rect,
src/graphics.rs:84
↓ 3 callersMethoddraw
Draws player to screen
src/player.rs:178
↓ 3 callersMethodload_image
Loads a bitmap which resides at `file_path` and returns a handle This handle can safely be used in any of the graphics subsystem's rendering contexts.
src/graphics.rs:55
↓ 3 callersMethodset_looking
This updates the `self.movement` tuple The `Motion` is kept as-is, but the `Facing` portion of the tuple is replaced with `direction`.
src/player.rs:380
↓ 2 callersMethodbottom_collision
(&self, delta: units::Game)
src/player.rs:634
↓ 2 callersMethoddamage_rectangle
A player's damage rectangle encompasses the whole player.
src/player.rs:561
↓ 2 callersMethoddraw
Draws current state to `display`
src/map.rs:173
↓ 2 callersMethodis_strobed
(&self)
src/player.rs:585
↓ 2 callersMethodleft_collision
x-axis collision detection
src/player.rs:599
↓ 2 callersMethodlook_horizontal
(&mut self)
src/player.rs:503
↓ 2 callersMethodright_collision
(&self, delta: units::Game)
src/player.rs:611
↓ 2 callersMethodset_facing
This updates the `self.movement` tuple The `Motion` is kept as-is, but the `Facing` portion of the tuple is replaced with `direction`.
src/player.rs:372
↓ 2 callersMethodstop_moving
The player will immediately cease acceleration. They will still be facing the same direction as before this call.
src/player.rs:485
↓ 2 callersMethodtop_collision
y-axis collision detection
src/player.rs:623
↓ 2 callersMethodwas_key_released
Responds true if key was released since last call to `beginNewFrame()`. Responds false otherwise.
src/input.rs:56
↓ 1 callersMethodbegin_new_frame
Resets the toggle states of pressed & released keys.
src/input.rs:27
↓ 1 callersMethodcenter_x
(&self)
src/player.rs:594
↓ 1 callersMethodcenter_x
(&self)
src/enemies/bat.rs:90
↓ 1 callersMethodclear_buffer
(&self)
src/graphics.rs:96
↓ 1 callersMethodcollides_with
(&self, other: &Rectangle)
src/collisions.rs:34
↓ 1 callersMethodcurrent_motion
This is called to update the player's `movement` based on their current: acceleration, velocity, and collision state. Ideally this should be called e
src/player.rs:540
↓ 1 callersMethoddraw
Instructs our actors to draw their current state to the screen.
src/game.rs:168
↓ 1 callersMethoddraw_background
(&mut self, graphics: &graphics::Graphics)
src/map.rs:152
↓ 1 callersMethoddraw_hud
Draws player's HUD if available
src/player.rs:187
↓ 1 callersMethoddraw_sprites
(&mut self, graphics: &graphics::Graphics)
src/map.rs:156
↓ 1 callersMethodevent_loop
Polls current input events & dispatches them to the engine. Then renders a snapshot of the world-state and then waits until its next frame deadline.
src/game.rs:72
↓ 1 callersMethodget_colliding_tiles
Checks if `Rectangle` is colliding with any tiles in the foreground. NOTE: Checking a Rectangle which would be placed outside the tile-map results in
src/map.rs:211
↓ 1 callersMethodkey_down_event
Handles a key down event
src/input.rs:33
↓ 1 callersMethodkey_up_event
Handles a key up event
src/input.rs:39
↓ 1 callersMethodload_sprite
Loads a sprite for the selected `movement`, stores it in the player's sprite map. This exhaustively matches all tuples of (Motion,Facing,Looking), tho
src/player.rs:388
↓ 1 callersMethodload_sprite
(&mut self, display: &mut graphics::Graphics, facing: sprite::Facing)
src/enemies/bat.rs:59
↓ 1 callersMethodlook_down
(&mut self)
src/player.rs:494
↓ 1 callersMethodlook_up
(&mut self)
src/player.rs:489
↓ 1 callersMethodstart
(&mut self)
src/game.rs:63
↓ 1 callersMethodstart_jump
Resets the player's jump timer if they are currently on the ground. Otherwise: uses the remainder of the player's jump timer to extend their jump. Th
src/player.rs:513
↓ 1 callersMethodstart_moving_left
The player will immediately face `West` They will then accelerate at a constant rate in that direction.
src/player.rs:469
↓ 1 callersMethodstart_moving_right
The player will immediately face `East` They will then accelerate at a constant rate in that direction.
src/player.rs:477
↓ 1 callersMethodstop_jump
A player will immediately cease their jump and become subject to the effects of gravity. While the player is in this state: their remaining `jump tim
src/player.rs:527
↓ 1 callersMethodswitch_buffers
(&self)
src/graphics.rs:92
↓ 1 callersMethodtake_damage
The player takes damage from the world
src/player.rs:571
↓ 1 callersMethodupdate
Passes the current time in milliseconds to our underlying actors.
src/game.rs:183
↓ 1 callersMethodupdate_x
(&mut self, map: &map::Map)
src/player.rs:227
↓ 1 callersMethodupdate_y
(&mut self, map: &map::Map)
src/player.rs:296
↓ 1 callersMethodwas_key_pressed
Responds true if key was pressed since last call to `beginNewFrame()`. Responds false otherwise.
src/input.rs:46
Methodadd
(self, rhs: T)
src/units/drawing.rs:40
Methodadd
(self, rhs: Millis)
src/units/physics.rs:14
Methodcreate_test_map
Will initialize a map (20 * 15) tiles: Most of these tiles will be `Air` tiles. There are 15-tile high walls in the first and last columns. A small "
src/map.rs:68
Methoddamage_rectangle
(&self)
src/enemies/bat.rs:83
Methodderef
(&'a self)
src/units/physics.rs:42
Methoddiv
(self, rhs: T)
src/units/drawing.rs:73
Methoddiv
(self, rhs: Millis)
src/units/physics.rs:137
Methoddraw
Repeatedly paints the asset across the entire screen. Moving the destination rectangle `BACKGROUND_SIZE` pixels in either direction as it progresses.
src/backdrop.rs:25
Methoddraw
Draws selfs @ coordinates provided by
src/sprite.rs:93
Methoddraw
(&mut self, display: &graphics::Graphics)
src/enemies/bat.rs:115
Methodfrom_sprite
Creates a tile of `tile_type` initialized w/ its optional sprite.
src/map.rs:49
Functionmain
()
src/main.rs:16
Methodmul
(self, rhs: T)
src/units/drawing.rs:62
Methodmul
(self, rhs: Millis)
src/units/physics.rs:81
Methodneg
(self)
src/units/physics.rs:49
Methodnew
(path: String, graphics: &mut graphics::Graphics)
src/backdrop.rs:17
Methodnew
Starts running this games event loop, note that this will block indefinitely. This function will return to the caller when the escape key is pressed.
src/game.rs:36
Methodnew
()
src/input.rs:18
Methodnew
A new sprite which will draw itself at `coords` `sprite_at` is the index (row) where the sprite starts in `file_name`
src/sprite.rs:62
Methodnew
Loads and initializes a set of sprite-sheets for the various combinatoins of directions. (These incl: facing west and east for: standing, walking, jum
src/player.rs:115
Methodnew
Prepare the display for rendering
src/graphics.rs:19
Methodnew
(width: units::Game, height: units::Game)
src/collisions.rs:19
Methodnew
(row: units::Tile, col: units::Tile, tile_type: TileType)
src/map.rs:27
Methodnew
(display: &mut graphics::Graphics, x: units::Game, y: units::Game)
src/enemies/bat.rs:37
Methodsub
(self, rhs: T)
src/units/drawing.rs:51
Methodsub
(self, rhs: Millis)
src/units/physics.rs:24
Methodupdate
(&mut self, _elapsed_time: units::Millis)
src/sprite.rs:108
Methodupdate
Updates player-state that relies on time data. (Namely physics calculations.) Determines which sprite-sheet should be used for thsi frame. Forwards th
src/player.rs:208
Methodupdate
no-op for demo map
src/map.rs:192
Methodupdate
(&mut self, elapsed_time: units::Millis, player_x: units::Game)
src/enemies/bat.rs:94