Main Methods - RasmusEngstroem/Awesome_game_3K GitHub Wiki

`````Because of inheritance, many of the methods/functions are repeated several places.`

Player:

initPlayer(container); // Loads in the pictures, Sprites and Animations death(); // Handles what happens when the player dies movePlayer(container,delta); // move the player - gravity - add the direction vector collisionDeflection(container,delta); // puch player around according to what hits him damping(delta); // damp the speed drawPlayer(); // draw the player

Enemies:

initBot(container); // initialize the enemy - animations etc moveBot(delta, screen_pos_x, screen_pos_y); // move the enemy edgeTurn(); // turn the enemy when reached an edge collisionRepeller(delta); // make the enemy not go through the blocks marioCollision(); // handle collision with the player drawBot(); // draw the enemy

Blocks:

checkCollision(); // check collision with player breakBox(); // destroy the box placeClones(); // place instances of the block according to replication number

Level:

moveLevel(delta); // move the level position according to player position showStads(container, g); // show game info to the player