Guest User

Untitled

a guest
Sep 26th, 2023
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Mover : RaverieComponent
  2. {
  3.   function Initialize(init : CogInitializer)
  4.   {
  5.     Raverie.Connect(this.Space, Events.LogicUpdate, this.OnLogicUpdate);
  6.   }
  7.  
  8.   function OnLogicUpdate(event : UpdateEvent)
  9.   {
  10.     if (Raverie.Keyboard.KeyIsDown(Keys.W)) {
  11.       this.Owner.Transform.WorldTranslation += Real3(0, 0, -event.Dt * 10.0);
  12.     }
  13.   }
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment