Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jcdevgame authored Jun 6, 2024
1 parent 4e18a1d commit 25e7fdd
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,44 @@ Escape Room Creator was a side project I did whenever I had free time. This is a
- Good way to learn programming

## Documentation:

### Sprite Class
#### Properties:
- `x`
- `y`
- `width`
- `height`
- `anchored`
- `color`
- `mass`
- `imgID`
- `flipHorizontally`
- `flipVertically`
#### Methods:
- `findObjectByName(classNameToFind)` (Used to find and gives the ability to change the properties of another sprite)
- `movementDefault()`
- `update()`

### InputManager
#### Methods:
- `isKeyPressed(key)` (Check if a key is pressed, it returns a true/false statement, so it can be used in an if statement: if (this.inputManager.isKeyPressed("w")

### AudioManager
#### Methods:
- `loadSound(url)` (Used to load a sound)
- `playSound(url, volume = 1.0)` (Used to play a sound)

### ParticleManager
#### Methods:
- `createParticle(x, y, velocityX, velocityY, lifetime)` Used to create a particle at a location, with a velocity
- `createRandomParticle(x, y, lifetime)` Create a random particle at a location with a random velocity
- `updateParticles()` Used to update the particles
- `renderParticles(context, color)` Used to render the particles.

### Animation
#### Constructor:
`constructor(imageArray)` Provide it with an image array (the animation keyframes)
#### Methods:
- `playOnSprite(targetSprite)` Play on a sprite
- `stop()` Stop anim
- `setFrame(frameIndex)` Set Frame

0 comments on commit 25e7fdd

Please sign in to comment.