Open bennsm opened 1 year ago
That's a really cool idea, it would be cool to see it added!
The decorator should be applied to components or services and have maid task automatically given to the connection.
@Component({})
export class TimeGui extends BaseComponent {
@Connect(workspaceAttribs.getChangedSignal('TimeLeft')) // support for every signals
private updateTime() {
this.instance.Text = tostring(workspaceAttribs.get('TimeLeft'))
}
}
That's a really cool idea, it would be cool to see it added!
The decorator should be applied to components or services and have maid task automatically given to the connection.
@Component({}) export class TimeGui extends BaseComponent { @Connect(workspaceAttribs.getChangedSignal('TimeLeft')) // support for every signals private updateTime() { this.instance.Text = tostring(workspaceAttribs.get('TimeLeft')) } }
This is for @flamework/networking
and not signals. Something like that would be out of scope for Flamework and could be implemented using the modding API or a custom decorator.
current required code:
potential required code:
it's so much cleaner