anikaagit / Anika_2025

Apache License 2.0
0 stars 0 forks source link

Sprint 2 #8

Open anikaagit opened 1 week ago

anikaagit commented 1 week ago

Popcorn Hack 1

Rpg.md defines data for the assets in the game. It also starts the game.

Gamecontrol.js manages key events.

Gameenv.js defines canvas properties

Background.js handles the background

Player.js handles the player (creating the player)

anikaagit commented 1 week ago

Popcorn Hack 2

anikaagit commented 1 week ago

Popcorn Hack 3

image a "method" is a function that defines the behavior of an object. In this case, the methods are helpful to manage the players behavior, from rendering on the screen to responding to player input.

image A constructor initializes an object and sets up the attributes such as width and height. In this case, the object is the player's scale.

image A dependency is an external module that contains classes that your object relies on. In this case, the module game environment is relevant to the player class and the objects in it

anikaagit commented 1 week ago

image Exports make your class available for use in other modules. This is exporting the "Player" class