Soyez le premier à donner votre avis sur cette source.
Vue 7 696 fois - Téléchargée 894 fois
voitvito = 2; //vitesse de la voiture voit.onEnterFrame = function() { trace(voitvito); if (Key.isDown(Key.RIGHT)) { voit._rotation += 2; } if (Key.isDown(Key.LEFT)) { voit._rotation -= 2; } if (Key.isDown(Key.DOWN)) { voitvito = 2; } if (Key.isDown(Key.UP)) { if (voit._rotation>=0 && voit._rotation<=90) { voit._y -= (voitvito/90)*(90-voit._rotation); voit._x += (voitvito/90)*voit._rotation; if (voitvito<7) { voitvito += 0.05; } } if (voit._rotation>90 && voit._rotation<=180) { voit._x += (voitvito/180)*(270-voit._rotation); voit._y += (voitvito/180)*voit._rotation; if (voitvito<7) { voitvito += 0.05; } } if (voit._rotation>=0-90 && voit._rotation<0) { voit._y -= (voitvito/90)*(90+voit._rotation); voit._x -= (voitvito/90)*(-voit._rotation); if (voitvito<7) { voitvito += 0.05; } } if (voit._rotation>=0-180 && voit._rotation<-90) { voit._x -= (voitvito/90)*(-(90+voit._rotation)); voit._y -= 0-((voitvito/90)*(-voit._rotation)); if (voitvito<7) { voitvito += 0.05; } } } };
Merci d'avance.
Amicalement Fehd01
Je cherche justement une personne qui me ferais un jeux plate forme simple un seul niveaux ou il sajit de faire avencer sauté un cheval et lui faire manger des pommes pour gagner des point si le dessin 2D n'est pas votre fort pas grave je peux fournir
Je ne sait pas codé donc....
Mais j'ai besoin d'une réponse rapidement merci!!!
au cas ou il y a des interessés voici mon msn
pour plus d'informations sur le sujet
mely_dacari_AT_hotmail.com
Sérieusement je te dis chapeau !
Un grand merci pour ton code qui fonctionne a merveille.
G faillit abandonné ce projet mais maintenant je peux continuer. MERCI !!
Fab'
voitvitba = 5;
voit.onEnterFrame = function() {
//trace(voitvito);
//trace(voit._rotation);
if (Key.isDown(Key.RIGHT)) {
voit._rotation += 4;
}
if (Key.isDown(Key.LEFT)) {
voit._rotation -= 4;
}
if (Key.isDown(Key.DOWN)) {
voitvito = 2;
}
if (Key.isDown(Key.UP)) {
if (voit._rotation>=0 && voit._rotation<=90) {
voit._y -= (voitvito/90)*(90-voit._rotation);
voit._x += (voitvito/90)*voit._rotation;
if (voitvito<7) {
voitvito += 0.05;
}
}
if (voit._rotation>90 && voit._rotation<=180) {
voit._y -= (voitvito/90)*(90-voit._rotation);
voit._x += (voitvito/90)*(180-voit._rotation);
if (voitvito<7) {
voitvito += 0.05;
}
}
if (voit._rotation>=0-90 && voit._rotation<0) {
voit._y -= (voitvito/90)*(90+voit._rotation);
voit._x -= (voitvito/90)*(-voit._rotation);
if (voitvito<7) {
voitvito += 0.05;
}
}
if (voit._rotation>0-180 && voit._rotation<-90) {
//voit._x -= (voitvito/90)*(-(90+voit._rotation));
voit._x += (voitvito/90)*(-180-voit._rotation);
//voit._y -= 0-((voitvito/90)*(-voit._rotation));
voit._y += (voitvito/90)*(-90-voit._rotation);
if (voitvito<7) {
voitvito += 0.05;
}
}
}
};
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.