mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-04-27 13:11:42 +00:00
music and little ui
This commit is contained in:
parent
ce3e33d5b5
commit
d48c3aabdf
3 changed files with 13 additions and 10 deletions
|
|
@ -209,11 +209,7 @@ class MarbleWorld extends Scheduler {
|
||||||
public function postInit() {
|
public function postInit() {
|
||||||
this._ready = true;
|
this._ready = true;
|
||||||
this.playGui.init(this.scene2d);
|
this.playGui.init(this.scene2d);
|
||||||
var musicFileName = [
|
var musicFileName = 'data/sound/' + this.mission.missionInfo.music;
|
||||||
'data/sound/groovepolice.ogg',
|
|
||||||
'data/sound/classic vibe.ogg',
|
|
||||||
'data/sound/beach party.ogg'
|
|
||||||
][(mission.index + 1) % 3];
|
|
||||||
AudioManager.playMusic(ResourceLoader.getResource(musicFileName, ResourceLoader.getAudio, this.soundResources));
|
AudioManager.playMusic(ResourceLoader.getResource(musicFileName, ResourceLoader.getAudio, this.soundResources));
|
||||||
MarbleGame.canvas.clearContent();
|
MarbleGame.canvas.clearContent();
|
||||||
this.endPad.generateCollider();
|
this.endPad.generateCollider();
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,12 @@ class PlayGui {
|
||||||
timerCtrl.position = new Vector(215, 1);
|
timerCtrl.position = new Vector(215, 1);
|
||||||
timerCtrl.extent = new Vector(234, 58);
|
timerCtrl.extent = new Vector(234, 58);
|
||||||
|
|
||||||
|
var timerTransparency = new GuiImage(ResourceLoader.getResource('data/ui/game/transparency.png', ResourceLoader.getImage, this.imageResources)
|
||||||
|
.toTile());
|
||||||
|
timerTransparency.position = new Vector(14, -7);
|
||||||
|
timerTransparency.extent = new Vector(228, 71);
|
||||||
|
timerCtrl.addChild(timerTransparency);
|
||||||
|
|
||||||
timerNumbers[0].position = new Vector(23, 0);
|
timerNumbers[0].position = new Vector(23, 0);
|
||||||
timerNumbers[0].extent = new Vector(43, 55);
|
timerNumbers[0].extent = new Vector(43, 55);
|
||||||
|
|
||||||
|
|
@ -314,7 +320,7 @@ class PlayGui {
|
||||||
helpTextCtrl.horizSizing = Width;
|
helpTextCtrl.horizSizing = Width;
|
||||||
|
|
||||||
helpTextBackground = new GuiText(bfont);
|
helpTextBackground = new GuiText(bfont);
|
||||||
helpTextBackground.text.textColor = 0x000000;
|
helpTextBackground.text.textColor = 0x777777;
|
||||||
helpTextBackground.position = new Vector(1, 1);
|
helpTextBackground.position = new Vector(1, 1);
|
||||||
helpTextBackground.extent = new Vector(640, 14);
|
helpTextBackground.extent = new Vector(640, 14);
|
||||||
helpTextBackground.vertSizing = Height;
|
helpTextBackground.vertSizing = Height;
|
||||||
|
|
@ -333,13 +339,13 @@ class PlayGui {
|
||||||
helpTextCtrl.addChild(helpTextForeground);
|
helpTextCtrl.addChild(helpTextForeground);
|
||||||
|
|
||||||
var alertTextCtrl = new GuiControl();
|
var alertTextCtrl = new GuiControl();
|
||||||
alertTextCtrl.position = new Vector(0, 418);
|
alertTextCtrl.position = new Vector(0, 371);
|
||||||
alertTextCtrl.extent = new Vector(640, 58);
|
alertTextCtrl.extent = new Vector(640, 105);
|
||||||
alertTextCtrl.vertSizing = Top;
|
alertTextCtrl.vertSizing = Top;
|
||||||
alertTextCtrl.horizSizing = Width;
|
alertTextCtrl.horizSizing = Width;
|
||||||
|
|
||||||
alertTextBackground = new GuiText(bfont);
|
alertTextBackground = new GuiText(bfont);
|
||||||
alertTextBackground.text.textColor = 0x000000;
|
alertTextBackground.text.textColor = 0x776622;
|
||||||
alertTextBackground.position = new Vector(1, 1);
|
alertTextBackground.position = new Vector(1, 1);
|
||||||
alertTextBackground.extent = new Vector(640, 32);
|
alertTextBackground.extent = new Vector(640, 32);
|
||||||
alertTextBackground.vertSizing = Height;
|
alertTextBackground.vertSizing = Height;
|
||||||
|
|
@ -347,7 +353,7 @@ class PlayGui {
|
||||||
alertTextBackground.justify = Center;
|
alertTextBackground.justify = Center;
|
||||||
|
|
||||||
alertTextForeground = new GuiText(bfont);
|
alertTextForeground = new GuiText(bfont);
|
||||||
alertTextForeground.text.textColor = 0xFFFF00;
|
alertTextForeground.text.textColor = 0xffEE99;
|
||||||
alertTextForeground.position = new Vector(0, 0);
|
alertTextForeground.position = new Vector(0, 0);
|
||||||
alertTextForeground.extent = new Vector(640, 32);
|
alertTextForeground.extent = new Vector(640, 32);
|
||||||
alertTextForeground.vertSizing = Height;
|
alertTextForeground.vertSizing = Height;
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ class MissionElementScriptObject extends MissionElementBase {
|
||||||
var level:String;
|
var level:String;
|
||||||
var artist:String;
|
var artist:String;
|
||||||
var goldtime:String;
|
var goldtime:String;
|
||||||
|
var music:String;
|
||||||
|
|
||||||
public function new() {
|
public function new() {
|
||||||
_type = MissionElementType.ScriptObject;
|
_type = MissionElementType.ScriptObject;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue