Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Mover : RaverieComponent
- {
- function Initialize(init : CogInitializer)
- {
- Raverie.Connect(this.Space, Events.LogicUpdate, this.OnLogicUpdate);
- }
- function OnLogicUpdate(event : UpdateEvent)
- {
- if (Raverie.Keyboard.KeyIsDown(Keys.W)) {
- this.Owner.Transform.WorldTranslation += Real3(0, 0, -event.Dt * 10.0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment