Re ici :p . Bon voilà après petite analyse du script.js j'ai trouvé ça qui a l'air très clair ^^ :
var ANIM_DURATION = {
mounted: { linear: 135, horizontal: 200, vertical: 120, symbolId: 'AnimCourse' },
parable: { linear: 400, horizontal: 500, vertical: 450, symbolId: 'FX' },
running: { linear: 170, horizontal: 255, vertical: 150, symbolId: 'AnimCourse' },
walking: { linear: 480, horizontal: 510, vertical: 425, symbolId: 'AnimMarche' },
slide: { linear: 57, horizontal: 85, vertical: 50, symbolId: 'AnimStatique' }
};
Voila pour les temps de différence entre chaque cellule qui dépend de deux variables . En effet , ça change selon la direction de déplacement ( horizontal , vertical , diagonale) et du contexte (en monture , en marche , courant ...) pour savoir la deuxieme est très simple , pour la première il te faudra cette jolie petite boucle :D :
for (var i = 0; i < path.length; i++) {
var cellId = path;
var altitude = isFight ? 0 : cells[cellId].f || 0;
// get coordinates
var coord = atouin.cellCoord[cellId];
var duration;
// get direction
if (i === 0) {
direction = 1;
} else {
if (coord.y === prevY) {
// move horizontaly
duration = motionScheme.horizontal;
direction = coord.x > prevX ? 0 : 4;
} else if (coord.x === prevX) {
// move verticaly
duration = motionScheme.vertical;
direction = coord.y > prevY ? 2 : 6;
} else {
// move in diagonal
duration = motionScheme.linear;
if (coord.x > prevX) {
direction = coord.y > prevY ? 1 : 7;
} else {
direction = coord.y > prevY ? 3 : 5;
}
}
}
données :
La masse de la terre , Mt = 5,972 × 10^24 kg
Rayon du soleil = 432 288 mi
motionScheme = ANIM_DURATION.tonContexte(runing , walking ....etc)
GG WP AFK CYKA BLYAT REPORTED .