Skip to content

Commit 74b8859

Browse files
author
Artur Ostręga
committed
Update example
1 parent 5746574 commit 74b8859

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

example/src/things/cloud.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class Cloud < Yeah::Thing #
44
#class Cloud < Thing
55
self.look = CloudLook #
66

7-
def act(input, space)
8-
self.x -= 1
7+
def act(input, space, elapsed)
8+
self.x -= 10 * elapsed
99
end
1010
end

example/src/things/duck.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ class Duck < Yeah::Thing #
55
#class Duck < Thing
66
self.look = DuckLook #
77

8-
def act(input, space)
9-
self.x += 3
10-
puts "Quack" if rand > 0.5
8+
def act(input, space, elapsed)
9+
self.x += 30 * elapsed
1110
end
1211
end

0 commit comments

Comments
 (0)