Skip to content

Instantly share code, notes, and snippets.

@DanBradbury
Created August 18, 2014 04:27
Show Gist options
  • Save DanBradbury/0278e31045ba3eb827f4 to your computer and use it in GitHub Desktop.
Save DanBradbury/0278e31045ba3eb827f4 to your computer and use it in GitHub Desktop.
ep6Notes

##Resources

##Art Credits As always I am getting my art from OpenGameArt.org and again I have found some really talented people posting their work for people like me and you to use.

o_pause

///deactivate items
objects = ds_stack_create();

//single object
player = array(o_player.sprite_index,  o_player.image_index, o_player.x, o_player.y, o_player.image_xscale, o_player.image_yscale);
ds_stack_push(objects, player);
instance_deactivate_object(o_player);

//multiple objects
with(o_bird){
    ds_stack_push(o_pause.objects, array(sprite_index, image_index,x,y, image_xscale, image_yscale));
}
instance_deactivate_object(o_bird);

temp = ds_stack_create();
ds_stack_copy(temp, objects);

while(!ds_stack_empty(objects)){
    obj = ds_stack_pop(objects);
    draw_sprite_ext(obj[0], obj[1], obj[2], obj[3], obj[4], obj[5], 0, c_white, 1);
}

objects = temp;

Transparent Layer

draw_set_alpha(0.75);
draw_set_color(c_black);
draw_rectangle(0,0,room_width, room_height,false);
draw_set_alpha(1);
draw_set_color(c_white);
draw_text((view_xview[0]+view_wview[0])/2,view_yview[0]+view_hview[0]/2,"GAME PAUSED");

if(keyboard_check_pressed(vk_enter)) {
    instance_activate_all();
    instance_destroy();
}

array(arg0,...)

a[0] = noone;

for(i=0;i<argument_count;i++){
    a[i] = argument[i];    
}
return a;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment