A Pen by Secret Sam on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body, input, button { | |
color: #0a0a29; | |
font-family: 'Avenir Next','Lato','Helvetica Neue',Helvetica,Arial,sans-serif; | |
} | |
.navbar .navbar-inner { | |
background: white; | |
color: #0a0a29; | |
font-weight: 500; | |
padding: 8px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//spr_EnemyDead is a speparate sprite that contains the image of the enemy rotated slightly. | |
//Trying to get enemy once hit, to switch to spr_EnemyDead and then fall off screen, at the moment, as soon | |
//as player bounces off head he switches back to alive sprite. | |
//Enemy Movement | |
hsp = dir * movespeed; | |
vsp += grav; | |
sprite_index = spr_enemy | |
//Horizontal Collision |