refactor out custom app initialization.
This commit is contained in:
parent
abbf9d594e
commit
a7997608c2
@ -1,6 +1,8 @@
|
|||||||
import {Scene, Sound} from "@babylonjs/core";
|
import {Scene, Sound} from "@babylonjs/core";
|
||||||
|
|
||||||
export class DiaSounds {
|
export class DiaSounds {
|
||||||
|
private readonly scene: Scene;
|
||||||
|
|
||||||
constructor(scene: Scene) {
|
constructor(scene: Scene) {
|
||||||
this.scene = scene;
|
this.scene = scene;
|
||||||
this._enter = new Sound("enter", "./sounds.mp3", this.scene, null, {
|
this._enter = new Sound("enter", "./sounds.mp3", this.scene, null, {
|
||||||
@ -30,7 +32,6 @@ export class DiaSounds {
|
|||||||
this._enter.autoplay = true;
|
this._enter.autoplay = true;
|
||||||
DiaSounds._instance = this;
|
DiaSounds._instance = this;
|
||||||
}
|
}
|
||||||
private readonly scene: Scene;
|
|
||||||
|
|
||||||
private static _instance: DiaSounds;
|
private static _instance: DiaSounds;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user