NewKeyboardScroller creates a new KeyboardScroller system using the provided scrollSpeed, and horizontal and vertical axes.
(scrollSpeed float32, hori, vert string)
| 355 | // NewKeyboardScroller creates a new KeyboardScroller system using the provided scrollSpeed, |
| 356 | // and horizontal and vertical axes. |
| 357 | func NewKeyboardScroller(scrollSpeed float32, hori, vert string) *KeyboardScroller { |
| 358 | kbs := &KeyboardScroller{ |
| 359 | ScrollSpeed: scrollSpeed, |
| 360 | } |
| 361 | |
| 362 | kbs.BindKeyboard(hori, vert) |
| 363 | |
| 364 | return kbs |
| 365 | } |
| 366 | |
| 367 | // EntityScroller scrolls the camera to the position of a entity using its space component. |
| 368 | type EntityScroller struct { |