function my_scripts_method() {
wp_enqueue_script(
'custom-script',
get_template_directory_uri() . '/js/main.js',
array('jquery'),
1,
true
);
}
add_action('wp_enqueue_scripts', 'my_scripts_method');
0 : 1
1 : 7
2 : 3
3 : 2
4 : 1
5 : 1
6 : 1
7 : 2
8 : 1
9 : 1
;; connection timed out; no servers could be reached
var Sprite = function(options)
{
this.image = options.image;
this.sx = options.x;
this.sy = options.y;
this.sw = options.width;
this.sh = options.height;
this.dx = options.dx;
this.dy = options.dy;
this.dw = options.deltaWidth;
this.dh = options.deltaHeight;
if(options.deltaWidth == undefined || options.deltaHeight == undefined){
this.dw = this.sw;
this.dh = this.sh;
}
if(options.dx == 0 || options.dx == undefined){
this.dx = 0;
}
if(options.dy == 0 || options.dy == undefined){
this.dy = 0;
}
if(options.width == undefined){
this.sw = this.image.width;
}
if(options.width == undefined){
this.sw = this.image.width;
}
this.Start = function(){}
this.Update = function(){}
this.Draw = function(){
game.ctx.drawImage(this.image, this.dx, this.dy, this.dw, this.dh, this.sx, this.sy, this.sw, this.sh);
}
}
на