mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-02-18 04:01:11 +00:00
fix some bugs, also rip traplaunches yet again cause i ncreased the timestep
This commit is contained in:
parent
874c633e1c
commit
da04499211
5 changed files with 11 additions and 6 deletions
BIN
marblegame.hl
BIN
marblegame.hl
Binary file not shown.
|
|
@ -1,5 +1,6 @@
|
|||
package;
|
||||
|
||||
import hxd.Window;
|
||||
import src.AudioManager;
|
||||
import src.Settings;
|
||||
import src.MarbleGame;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ final trailParticleOptions:ParticleEmitterOptions = {
|
|||
lifetimeVariance: 10,
|
||||
acceleration: 0,
|
||||
colors: [new Vector(1, 1, 0, 0), new Vector(1, 1, 0, 1), new Vector(1, 1, 1, 0)],
|
||||
sizes: [0.7, 0.4, 0.1],
|
||||
sizes: [0.4, 0.4, 0.1],
|
||||
times: [0, 0.15, 1]
|
||||
}
|
||||
};
|
||||
|
|
@ -842,7 +842,7 @@ class Marble extends GameObject {
|
|||
|
||||
var intersectT = this.getIntersectionTime(timeStep, velocity);
|
||||
|
||||
if (intersectT < timeStep) {
|
||||
if (intersectT < timeStep && intersectT > 0.000001) {
|
||||
intersectT *= 0.8; // We uh tick the shit to not actually at the contact time cause bruh
|
||||
// intersectT /= 2;
|
||||
var diff = timeStep - intersectT;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ typedef OptionsSettings = {
|
|||
var shadows:Bool;
|
||||
var musicVolume:Float;
|
||||
var soundVolume:Float;
|
||||
var vsync:Bool;
|
||||
}
|
||||
|
||||
typedef ControlsSettings = {
|
||||
|
|
@ -54,6 +55,7 @@ class Settings {
|
|||
shadows: false,
|
||||
musicVolume: 0,
|
||||
soundVolume: 0,
|
||||
vsync: true
|
||||
};
|
||||
|
||||
public static var controlsSettings:ControlsSettings = {
|
||||
|
|
@ -125,6 +127,7 @@ class Settings {
|
|||
controlsSettings = json.controls;
|
||||
progression = json.progression;
|
||||
}
|
||||
Window.getInstance().vsync = optionsSettings.vsync;
|
||||
}
|
||||
|
||||
public static function init() {
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class PlayMissionGui extends GuiImage {
|
|||
tabAdvanced.pressedAction = (sender) -> {
|
||||
currentList = MissionList.advancedMissions;
|
||||
currentCategory = "advanced";
|
||||
setSelectedFunc(0);
|
||||
setSelectedFunc(cast Math.min(Settings.progression[2], currentList.length - 1));
|
||||
setCategoryFunc("advanced");
|
||||
}
|
||||
localContainer.addChild(tabAdvanced);
|
||||
|
|
@ -69,7 +69,7 @@ class PlayMissionGui extends GuiImage {
|
|||
tabIntermediate.pressedAction = (sender) -> {
|
||||
currentList = MissionList.intermediateMissions;
|
||||
currentCategory = "intermediate";
|
||||
setSelectedFunc(0);
|
||||
setSelectedFunc(cast Math.min(Settings.progression[1], currentList.length - 1));
|
||||
setCategoryFunc("intermediate");
|
||||
}
|
||||
localContainer.addChild(tabIntermediate);
|
||||
|
|
@ -227,7 +227,7 @@ class PlayMissionGui extends GuiImage {
|
|||
tabBeginner.pressedAction = (sender) -> {
|
||||
currentList = MissionList.beginnerMissions;
|
||||
currentCategory = "beginner";
|
||||
setSelectedFunc(0);
|
||||
setSelectedFunc(cast Math.min(Settings.progression[0], currentList.length - 1));
|
||||
setCategoryFunc("beginner");
|
||||
}
|
||||
localContainer.addChild(tabBeginner);
|
||||
|
|
@ -366,6 +366,7 @@ class PlayMissionGui extends GuiImage {
|
|||
|
||||
public override function render(scene2d:Scene) {
|
||||
super.render(scene2d);
|
||||
setSelectedFunc(0);
|
||||
setSelectedFunc(cast Math.min(currentList.length - 1, Settings.progression[["beginner", "intermediate", "advanced"].indexOf(currentCategory)]));
|
||||
// setSelectedFunc(0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue