Files
armorpaint/base/Sources/nodes/StringNode.ts
T
luboslenco 705045dfd4 Format
2024-03-07 20:37:30 +01:00

21 lines
391 B
TypeScript

class StringNode extends LogicNode {
value: string;
constructor(value: string = "") {
super();
this.value = value;
}
override get = (from: i32, done: (a: any)=>void) => {
if (this.inputs.length > 0) this.inputs[0].get(done);
else done(this.value);
}
override set = (value: any) => {
if (this.inputs.length > 0) this.inputs[0].set(value);
else this.value = value;
}
}