Added new config option for fly mode.
This commit is contained in:
parent
45dd7cc6d3
commit
9cfab198d8
@ -16,6 +16,7 @@ export class AppConfig {
|
|||||||
newRelicAccount: null,
|
newRelicAccount: null,
|
||||||
physicsEnabled: false,
|
physicsEnabled: false,
|
||||||
demoCompleted: false,
|
demoCompleted: false,
|
||||||
|
flyMode: false
|
||||||
};
|
};
|
||||||
this.onConfigChangedObservable.add((config) => {
|
this.onConfigChangedObservable.add((config) => {
|
||||||
this._currentConfig = config;
|
this._currentConfig = config;
|
||||||
@ -31,6 +32,11 @@ export class AppConfig {
|
|||||||
this.onConfigChangedObservable.notifyObservers(this._currentConfig, 2);
|
this.onConfigChangedObservable.notifyObservers(this._currentConfig, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public setFlyMode(value: boolean) {
|
||||||
|
this._currentConfig.flyMode = value;
|
||||||
|
this.onConfigChangedObservable.notifyObservers(this._currentConfig, 2);
|
||||||
|
}
|
||||||
|
|
||||||
public setCreateSnap(value: number) {
|
public setCreateSnap(value: number) {
|
||||||
this._currentConfig.createSnap = value;
|
this._currentConfig.createSnap = value;
|
||||||
this.onConfigChangedObservable.notifyObservers(this._currentConfig, 2);
|
this.onConfigChangedObservable.notifyObservers(this._currentConfig, 2);
|
||||||
@ -61,4 +67,10 @@ export class AppConfig {
|
|||||||
this.onConfigChangedObservable.notifyObservers(this._currentConfig, 2);
|
this.onConfigChangedObservable.notifyObservers(this._currentConfig, 2);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public setPhysicsEnabled(physicsEnabled: boolean) {
|
||||||
|
this._currentConfig.physicsEnabled = physicsEnabled;
|
||||||
|
this.onConfigChangedObservable.notifyObservers(this._currentConfig, 2);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -10,5 +10,6 @@ export type AppConfigType = {
|
|||||||
newRelicAccount?: string,
|
newRelicAccount?: string,
|
||||||
demoCompleted?: boolean,
|
demoCompleted?: boolean,
|
||||||
passphrase?: string,
|
passphrase?: string,
|
||||||
|
flyMode?: boolean,
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user