-------ACCIONES DEL FOTOGRAMA---------
stop();
vidas = 4;
puntos = 0;
this.onEnterFrame = function() {
switch (Key.getCode()) {
case Key.UP :
if (!this.suelo.hitTest(this.bola._x, this.bola._y-10, true)) {
this.bola._x += 0;
this.bola._y -= 5;
this.bola._rotation = -90;
}
break;
case Key.DOWN :
if (!this.suelo.hitTest(this.bola._x, this.bola._y+10, true)) {
this.bola._x += 0;
this.bola._y += 5;
this.bola._rotation = 90;
}
break;
case Key.RIGHT :
if (!this.suelo.hitTest(this.bola._x+10, this.bola._y, true)) {
this.bola._x += 5;
this.bola._y += 0;
this.bola._rotation = 0;
}
break;
case Key.LEFT :
if (!this.suelo.hitTest(this.bola._x-10, this.bola._y, true)) {
this.bola._x -= 5;
this.bola._y += 0;
this.bola._rotation = 180;
}
break;
}
if(vidas == 0){
gotoAndStop(3);
}
if(puntos > 181){
gotoAndStop(4);
}
};
---------ACCIONES DEL FANTASMA ------------
onClipEvent(enterFrame){
if(_root.bola.hitTest(this)){
_root.bola._x=500;
_root.bola._y=400;
_root.vidas--;
}
}
---------------puntos------------------------
onClipEvent (enterFrame) {
if (_root.bola.hitTest(this)) {
this.unloadMovie();
_root.puntos++;
}
}
hola necesito tu ayuda para hacer mi juego de pacman y no se puede ver tu video
ResponderEliminarayudame plis
claro ya pondre otro video para que puedas verlo
Eliminarplis ayudame
ResponderEliminarTu haces juegos HTML5 por encargo ? y cuanto costaría uno.
ResponderEliminar