File tree Expand file tree Collapse file tree 5 files changed +8
-5
lines changed
Expand file tree Collapse file tree 5 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 22
33class Example < Yeah ::Game
44#class Example < Game
5- display . size = 320 , 240
5+ display . size = 640 , 360
66 self . space = World
77end
Original file line number Diff line number Diff line change 33class CloudLook < Yeah ::FillLook #
44#class CloudLook < FillLook
55 self . size = 120 , 20
6- self . color = 0.8 , 0.8 , 0.9
6+ self . color = 0.9 , 0.9 , 1
77end
Original file line number Diff line number Diff line change 33
44class World < Yeah ::Space #
55#class World < Space
6- self . size = 320 , 240
6+ self . size = 640 , 360
77 self . clear_color = 0.5 , 0.7 , 0.5
88
99 def initialize
1010 super
1111
1212 things << Cloud . new ( x : width * 0.6 , y : height * 0.8 )
13- things << Duck . new ( x : width / 2 , y : height / 2 )
13+ things << Cloud . new ( x : width * 0.2 , y : height * 0.7 )
14+ things << Cloud . new ( x : width * 0.1 , y : height * 0.9 )
15+ things << Duck . new ( x : 10 , y : 10 )
1416 #things << Duck.new(position: Vec2.divide(size, 2))
1517 end
1618end
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ class Duck < Yeah::Thing #
66 self . look = DuckLook #
77
88 def act ( input , space )
9- puts "Quack" if rand > 0.8
9+ self . x += 3
10+ puts "Quack" if rand > 0.5
1011 end
1112end
You can’t perform that action at this time.
0 commit comments