updated 内部属性修改

This commit is contained in:
郑浩乐
2016-01-05 18:00:22 +08:00
parent 0634570c60
commit 7e8d45f058
2 changed files with 30 additions and 15 deletions

View File

@@ -218,10 +218,11 @@
y:pos.y,
width:30,
height:30,
type:1,
orientation:3,
speed:10,
update:function(){
var coord = map.position2coord(this.x,this.y);
var coord = this.coord;
var steps = 2;
if(!coord.offset){
if(typeof this.control.orientation!='undefined'){
@@ -338,11 +339,20 @@
context.fill();
}
});
var pos = map.coord2position(12,14);
stage.createItem({
x:650,
y:100,
x:pos.x,
y:pos.y,
width:30,
height:30,
type:2,
speed:10,
update:function(){
this.path = map.finder({
start:[this.coord.y,this.coord.x],
end:[player.coord.y,player.coord.x]
});
},
draw:function(context){
context.fillStyle = '#F00';
context.beginPath();