command
Version:
v0.0.0-...-8fc0beb
Opens a new window with list of versions in this module.
Published: Nov 28, 2016
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Mouse Follow Demo
What does it do?
It demonstrates how one can implement a sprite that will follow the user's mouse movements.
What are important aspects of the code?
These things are key in this demo:
FollowSystem
, which implements an update method that sets the SpaceComponent(sprite)'s position to that of the current mouse position. Like so:
func (s *FollowSystem) Update(dt float32) {
for _, e := range s.entities {
e.SpaceComponent.Position.X += engo.Input.Axis(engo.DefaultMouseXAxis).Value()
e.SpaceComponent.Position.Y += engo.Input.Axis(engo.DefaultMouseYAxis).Value()
}
}
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.