pxt-ev3/sim/state/light.ts

19 lines
389 B
TypeScript
Raw Normal View History

2017-07-11 10:15:17 +02:00
namespace pxsim {
export class EV3LightState {
lightPattern: number;
constructor() {
this.lightPattern = 0;
}
}
}
namespace pxsim.output {
export function setLights(pattern: number) {
2017-12-18 22:04:17 +01:00
const lightState = ev3board().getBrickNode().lightState;
2017-07-11 10:15:17 +02:00
lightState.lightPattern = pattern;
runtime.queueDisplayUpdate();
}
}