Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///draw the player
- var drawX = x;
- var drawY = y;
- if (global.grav == -1) //need to draw the player a pixel off in the y-axis when flipped for some reason
- drawY += 1;
- draw_sprite_ext(sprite_index,image_index,drawX,drawY,image_xscale*xScale,image_yscale*global.grav,image_angle,image_blend,image_alpha);
- //draw the player's hitbox
- if (global.debugShowHitbox)
- draw_sprite_ext(mask_index,image_index,x,y,image_xscale,image_yscale,image_angle,image_blend,image_alpha*0.8);
- // player outline
- if (global.playerSprite = 0) {
- PlayerIdle = sprPlayerIdleOutline0;
- PlayerJump = sprPlayerJumpOutline0;
- PlayerFall = sprPlayerFallOutline0;
- PlayerRunning = sprPlayerRunningOutline0;
- PlayerSliding = sprPlayerSlidingOutline0;
- } else if (global.playerSprite = 1) {
- PlayerIdle = sprPlayerIdleOutline1;
- PlayerJump = sprPlayerJumpOutline1;
- PlayerFall = sprPlayerFallOutline1;
- PlayerRunning = sprPlayerRunningOutline1;
- PlayerSliding = sprPlayerSlidingOutline1;
- }
- if (global.playerSprite >= 0) {
- if (objPlayer.sprite_index == sprPlayerIdle) {
- show_debug_message("idle")
- sprite_i = PlayerIdle;
- } else if (objPlayer.sprite_index == sprPlayerJump ) {
- show_debug_message("jump")
- sprite_i = PlayerJump;
- } else if (objPlayer.sprite_index == sprPlayerFall ) {
- show_debug_message("fall")
- sprite_i = PlayerFall;
- } else if (objPlayer.sprite_index == sprPlayerRunning ) {
- show_debug_message("run")
- sprite_i = PlayerRunning;
- } else if (objPlayer.sprite_index == sprPlayerSliding ) {
- sprite_i = PlayerSliding;
- }
- image_index = objPlayer.image_index
- }
- /// uuuuugh image blend, make it only on outlines
- //image_blend = make_color_rgb(global.cur_col_pr, global.cur_col_pg, global.cur_col_pb)
- //image_blend = make_color_rgb(global.cur_col_r, global.cur_col_g, global.cur_col_b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement