MCPcopy Create free account

hub / github.com/aochagavia/rocket_wasm / functions

Functions55 in github.com/aochagavia/rocket_wasm

↓ 7 callersMethodposition
Returns the position of the object
src/geometry/traits.rs:22
↓ 4 callersMethodadvance
Advances the object in the given amount of units, according to its direction
src/geometry/traits.rs:50
↓ 4 callersFunctionint_to_bool
(i: c_int)
src/lib.rs:86
↓ 3 callersFunctionfast_retain
Optimized version of `Vec::retain` We achieve better performance by renouncing to keep the original order of the `Vec`
src/util.rs:7
↓ 3 callersMethodradius
(&self)
src/models/enemy.rs:27
↓ 3 callersMethodupdate
Update the enemy
src/models/enemy.rs:19
↓ 2 callersMethodcollides_with
Returns true if the two objects collide and false otherwise
src/geometry/traits.rs:86
↓ 2 callersFunctionmake_explosion
Generates a new explosion of the given intensity at the given position. This works best with values between 5 and 25
src/util.rs:21
↓ 2 callersMethodsquared_distance_to
Returns the squared distance from this point to the given one
src/geometry/point.rs:29
↓ 1 callersMethodadvance_wrapping
Similar to `Advance::advance`, but the final position will be wrapped around the given bounds
src/geometry/traits.rs:57
↓ 1 callersMethodcontains
Returns true if the `Point` is contained in this `Size` or false otherwise
src/geometry/size.rs:19
↓ 1 callersMethodfront
Returns the front of the rocket
src/models/player.rs:29
↓ 1 callersMethodintersect_circle
Checks if this point is contained in a circle
src/geometry/point.rs:52
↓ 1 callersMethodinvert
Consumes the vector and returns a new one with inverted direction
src/models/vector.rs:28
↓ 1 callersFunctionnew_game_data
(width: f64, height: f64)
src/lib.rs:33
↓ 1 callersMethodpoint_to
Changes the direction of the vector to point to the given target
src/geometry/traits.rs:39
↓ 1 callersMethodrandom_x
Returns a random x coordinate within the bounds of this `Size`
src/geometry/size.rs:25
↓ 1 callersMethodrandom_y
Returns a random y coordinate within the bounds of this `Size`
src/geometry/size.rs:30
↓ 1 callersMethodreset
Reset our game-state
src/game_state.rs:26
↓ 1 callersMethodrotate
Rotates the point through the origin in the given angle (radians)
src/geometry/point.rs:35
↓ 1 callersMethodtranslate
Translates the point by another point
src/geometry/point.rs:45
↓ 1 callersMethodupdate_seconds
Updates the game `dt` is the amount of seconds that have passed since the last update
src/controllers/time.rs:54
Methodadd
(self, _rhs: Point)
src/geometry/point.rs:69
Methoddiameter
Returns the diameter of the objects
src/geometry/traits.rs:81
Methoddiv
(self, _rhs: Point)
src/geometry/point.rs:141
Functiondraw
()
src/lib.rs:57
Methodeq
(&self, _rhs: &Self)
src/geometry/point.rs:60
Methodhandle_bullet_collisions
Handles collisions between the bullets and the enemies When an enemy is reached by a bullet, both the enemy and the bullet will be removed. Additiona
src/controllers/collisions.rs:19
Methodhandle_collisions
(state: &mut GameState)
src/controllers/collisions.rs:10
Methodhandle_player_collisions
Handles collisions between the player and the enemies
src/controllers/collisions.rs:51
Methodmul
(self, _rhs: Point)
src/geometry/point.rs:117
Methodnew
Returns a new `GameState` containing a `World` of the given `Size`
src/game_state.rs:17
Methodnew
(rng: T)
src/controllers/time.rs:41
Methodnew
Returns a new `Point` with the given coordinates
src/geometry/point.rs:16
Methodnew
Returns a new `Size` of the given dimensions
src/geometry/size.rs:14
Methodnew
Create a particle with the given vector and time to live in seconds
src/models/particle.rs:18
Methodnew
Create a bullet with the given vector
src/models/bullet.rs:15
Methodnew
Returns a new world of the given size
src/models/world.rs:17
Methodnew
Create a enemy with the given vector
src/models/enemy.rs:14
Methodnew
Returns a new `Vector`
src/models/vector.rs:18
Methodradius
(&self)
src/models/bullet.rs:26
Methodradius
(&self)
src/models/player.rs:37
Methodrandom
Returns a random `Point` within the given bounds (exclusive)
src/geometry/point.rs:21
Methodrandom
Returns a random `Vector` within the given bounds
src/models/vector.rs:23
Methodrandom
Create a new `Player` with a random position and direction
src/models/player.rs:24
Functionresize
(width: c_double, height: c_double)
src/lib.rs:52
Methodsub
(self, _rhs: Point)
src/geometry/point.rs:93
Functiontoggle_boost
(b: c_int)
src/lib.rs:97
Functiontoggle_shoot
(b: c_int)
src/lib.rs:91
Functiontoggle_turn_left
(b: c_int)
src/lib.rs:103
Functiontoggle_turn_right
(b: c_int)
src/lib.rs:109
Functionupdate
(time: c_double)
src/lib.rs:80
Methodupdate
Update the particle
src/models/particle.rs:23
Methodupdate
Update the bullet's position
src/models/bullet.rs:20
Methodwrap
(k: &mut f64, bound: f64)
src/geometry/traits.rs:60