mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
fix achievement popup and gravity change bug
This commit is contained in:
parent
773efdd8dd
commit
60693cf306
2 changed files with 8 additions and 3 deletions
|
|
@ -1417,6 +1417,11 @@ class MarbleWorld extends Scheduler {
|
||||||
this.finishPitch = this.marble.camera.CameraPitch;
|
this.finishPitch = this.marble.camera.CameraPitch;
|
||||||
displayAlert("Congratulations! You've finished!");
|
displayAlert("Congratulations! You've finished!");
|
||||||
if (!this.isWatching) {
|
if (!this.isWatching) {
|
||||||
|
var myScore = {
|
||||||
|
name: "Player",
|
||||||
|
time: this.gameMode.getFinishScore()
|
||||||
|
};
|
||||||
|
Settings.saveScore(mission.path, myScore, this.gameMode.getScoreType());
|
||||||
var notifies = AchievementsGui.check();
|
var notifies = AchievementsGui.check();
|
||||||
var delay = 5.0;
|
var delay = 5.0;
|
||||||
var achDelay = 0.0;
|
var achDelay = 0.0;
|
||||||
|
|
@ -1576,7 +1581,7 @@ class MarbleWorld extends Scheduler {
|
||||||
|
|
||||||
var u = v1.normalized();
|
var u = v1.normalized();
|
||||||
var v = v2.normalized();
|
var v = v2.normalized();
|
||||||
if (u.dot(v) == -1) {
|
if (Math.abs(u.dot(v) + 1) < hxd.Math.EPSILON) {
|
||||||
var q = new Quat();
|
var q = new Quat();
|
||||||
var o = orthogonal(u).normalized();
|
var o = orthogonal(u).normalized();
|
||||||
q.x = o.x;
|
q.x = o.x;
|
||||||
|
|
|
||||||
|
|
@ -123,8 +123,8 @@ class EndGameGui extends GuiImage {
|
||||||
|
|
||||||
var rating = calcRating(score * 1000, mission.qualifyTime * 1000, mission.goldTime * 1000, Std.parseInt(mission.missionInfo.difficulty));
|
var rating = calcRating(score * 1000, mission.qualifyTime * 1000, mission.goldTime * 1000, Std.parseInt(mission.missionInfo.difficulty));
|
||||||
|
|
||||||
var myScore = {name: "Player", time: score};
|
// var myScore = {name: "Player", time: score};
|
||||||
Settings.saveScore(mission.path, myScore, scoreType);
|
// Settings.saveScore(mission.path, myScore, scoreType);
|
||||||
|
|
||||||
var scoreData:Array<Score> = Settings.getScores(mission.path);
|
var scoreData:Array<Score> = Settings.getScores(mission.path);
|
||||||
while (scoreData.length < 1) {
|
while (scoreData.length < 1) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue