Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1. if (!isObject(bunnyBehavior))
  2. {
  3.    %template = new BehaviorTemplate(bunnyBehavior);
  4.    
  5.    %template.friendlyName = "Bunny Behavior";
  6.    %template.behaviorType = "Player Behavior";
  7.  
  8.    %template.addBehaviorField(yVelocity, "The object's vertical speed", float, 5.0);
  9. }
  10.  
  11. function bunnyBehavior::onLevelLoaded(%this)
  12. {
  13.    //moveMap is already defined in another place, and function call does work
  14.    moveMap.bindCmd(keyboard, "space", "bunnyBehavior.jump(1);", "");
  15. }
  16.  
  17. function bunnyBehavior::jump(%value)
  18. {
  19.    //line below gives me junk data
  20.    echo("yVelocity is" @ %this.yVelocity);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement