pxt-ev3/sim/state/light.ts
2017-12-19 14:20:35 -08:00

20 lines
428 B
TypeScript

namespace pxsim {
export class EV3LightState {
lightPattern: number;
constructor() {
this.lightPattern = 0;
}
}
}
namespace pxsim.output {
export function setLights(pattern: number) {
const brickState = ev3board().getBrickNode();
const lightState = brickState.lightState;
lightState.lightPattern = pattern;
brickState.setChangedState();
}
}