/**
* name
*/
module game{
export class btnMove extends Laya.Button{
constructor(){
super();
Laya.init(640,860,WebGL);
console.log("this = " + typeof(this.name));
this.on(Laya.Event.MOUSE_DOWN,this,this.onMouseDown);
}
private onMouseDown():void{
var hero = this.parent.getChildByName("hero1");
console.log("hero = " + typeof(hero));
console.log("hero = " + hero);
var parent = this.parent;
if (this.name == "btnforMove") {
console.log("btn = " + this.name);
}
else if (this.name == "test") {
console.log("btn = " + this.name);
}
}
}
}