-
Notifications
You must be signed in to change notification settings - Fork 129
gamepad client apis #573
Conversation
mmoskal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love the combo or button - clean and simple!
| } | ||
|
|
||
| ds.Gamepad.prototype.axes = function axes() { | ||
| let r = (this as any).__axes as ds.ClientRegister<{ x: number; y: number }> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can extend the ds.Gamepad interface (I know it's a class, but I think you can do interface) and add this field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do i have to? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nah ;)
| } | ||
|
|
||
| emit(newValue: T) { | ||
| if (this.value !== newValue) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was there a problem with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a bit misleading because in the case of axes ({x, y}), the equality check is not really useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, but this is generic - what if people use for say booleans?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix #573