Changeset 27403
- Timestamp:
- 12/25/08 20:54:58 (4 years ago)
- Location:
- lang/ruby/starframe/samples/stg
- Files:
-
- 1 added
- 1 modified
- 11 moved
-
main.rb (modified) (8 diffs)
-
resources (added)
-
resources/bg.png (moved) (moved from lang/ruby/starframe/samples/stg/bg.png) (1 prop)
-
resources/enemy.png (moved) (moved from lang/ruby/starframe/samples/stg/enemy.png) (1 prop)
-
resources/numbers.png (moved) (moved from lang/ruby/starframe/samples/stg/numbers.png) (1 prop)
-
resources/pause.png (moved) (moved from lang/ruby/starframe/samples/stg/pause.png) (1 prop)
-
resources/player.png (moved) (moved from lang/ruby/starframe/samples/stg/player.png) (1 prop)
-
resources/shot.png (moved) (moved from lang/ruby/starframe/samples/stg/shot.png) (1 prop)
-
resources/smoke.png (moved) (moved from lang/ruby/starframe/samples/stg/smoke.png) (1 prop)
-
resources/tm2_bom001.wav (moved) (moved from lang/ruby/starframe/samples/stg/tm2_bom001.wav) (1 prop)
-
resources/tm2_gun001.wav (moved) (moved from lang/ruby/starframe/samples/stg/tm2_gun001.wav) (1 prop)
-
resources/tm2_shoot000.wav (moved) (moved from lang/ruby/starframe/samples/stg/tm2_shoot000.wav) (1 prop)
-
resources/tm2r_bom34.wav (moved) (moved from lang/ruby/starframe/samples/stg/tm2r_bom34.wav) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/starframe/samples/stg/main.rb
r27389 r27403 33 33 # 自機 34 34 class Player < Character 35 @texture = StarRuby::Texture.load(" player")35 @texture = StarRuby::Texture.load("resources/player") 36 36 @center_x = 16 37 37 @center_y = 16+6 … … 86 86 # カスリアニメーションを動的に生成できるようにしたい 87 87 @scene.foreground.render_rect other.x-3, other.y-3, 7, 7, StarRuby::Color.new(0xFF, 0xFF, 0xFF) 88 StarRuby::Audio.play_se " tm2_shoot000" if StarRuby::Audio.playing_se_count < 488 StarRuby::Audio.play_se "resources/tm2_shoot000" if StarRuby::Audio.playing_se_count < 4 89 89 end 90 90 91 91 def init *args 92 92 self.src_height = 32 93 @crash_se = " tm2r_bom34"93 @crash_se = "resources/tm2r_bom34" 94 94 @score = -1000 95 95 super … … 124 124 def fire 125 125 animation(:shot).start 126 StarRuby::Audio.play_se " tm2_gun001"126 StarRuby::Audio.play_se "resources/tm2_gun001" 127 127 end 128 128 … … 145 145 def init options 146 146 @target = options[:target] 147 @crash_se = " tm2_bom001"147 @crash_se = "resources/tm2_bom001" 148 148 149 149 @shot_point_x = 0 … … 182 182 # 敵機名:ディスク 183 183 class Disc < Enemy 184 @texture = StarRuby::Texture.load(" enemy")184 @texture = StarRuby::Texture.load("resources/enemy") 185 185 @center_x = 16 186 186 @center_y = 16 … … 245 245 246 246 class Smoke < StarFrame::Sprite 247 @texture = StarRuby::Texture.load(" smoke")247 @texture = StarRuby::Texture.load("resources/smoke") 248 248 @center_x = 16 249 249 @center_y = 16 … … 268 268 269 269 class Shot < StarFrame::Sprite 270 @texture = StarRuby::Texture.load(" shot")270 @texture = StarRuby::Texture.load("resources/shot") 271 271 @center_x = 4 272 272 @center_y = 4 … … 343 343 @pause = false 344 344 345 @numbers = StarRuby::Texture.load(" numbers")346 @background = StarRuby::Texture.load(" bg")345 @numbers = StarRuby::Texture.load("resources/numbers") 346 @background = StarRuby::Texture.load("resources/bg") 347 347 @foreground = StarRuby::Texture.new(@screen.width, @screen.height) 348 348 349 349 @pause_screen = StarRuby::Texture.new(@screen.width, @screen.height) 350 350 @pause_screen.fill StarRuby::Color.new(0, 0, 0) 351 pause_logo = StarRuby::Texture.load(" pause")351 pause_logo = StarRuby::Texture.load("resources/pause") 352 352 @pause_screen.render_texture pause_logo, (@screen.width-pause_logo.width)/2, (@screen.height-pause_logo.height)/2 353 353 end -
lang/ruby/starframe/samples/stg/resources/bg.png
-
lang/ruby/starframe/samples/stg/resources/enemy.png
-
lang/ruby/starframe/samples/stg/resources/numbers.png
-
lang/ruby/starframe/samples/stg/resources/pause.png
-
lang/ruby/starframe/samples/stg/resources/player.png
-
lang/ruby/starframe/samples/stg/resources/shot.png
-
lang/ruby/starframe/samples/stg/resources/smoke.png
-
lang/ruby/starframe/samples/stg/resources/tm2_bom001.wav
-
lang/ruby/starframe/samples/stg/resources/tm2_gun001.wav
-
lang/ruby/starframe/samples/stg/resources/tm2_shoot000.wav
-
lang/ruby/starframe/samples/stg/resources/tm2r_bom34.wav
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)