scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] s.event :on_click do |event| s.delete end end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] s.set_center_position 110, 110 end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] p = s.get_center_position speak "position #{p[0]}, #{p[1]}" end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] s.set_position 110, 110 end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] p = s.get_position speak "position #{p[0]}, #{p[1]}" end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] # 90度時計回りに回転 s.set_rotation Math::PI / 2 end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] r = s.get_rotation speak "rotation #{r}" end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] # スプライトを2倍に拡大 s.set_scale 2, 2 end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] scl = s.get_scale speak "scale #{scl[0]}, #{scl[1]}" end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] # スプライトを不透明な白に設定 s.set_color 255, 255, 255, 255 end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] c = s.get_color speak "color #{c[0]}, #{c[1]}, #{c[2]}, #{c[3]}" end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] s.set_data :variable_name, 100 end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] s.set_data :variable_name, 100 speak "s.get_data #{s.get_data :variable_name}", end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] s.set_src_size 32, 32 s.set_dest_size 64, 64 s.copy_rect 0, 0 end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] sz = s.get_src_size speak "s.get_src_size #{sz[0]}, #{sz[1]}" end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] s.set_src_size 32, 32 s.set_dest_size 64, 64 s.copy_rect 0, 0 end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] sz = s.get_dest_size speak "s.get_dest_size #{sz[0]}, #{sz[1]}" end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] s.set_src_size 32, 32 s.set_dest_size 64, 64 s.copy_rect 0, 0 end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] s.set_center_offset 32, 32 end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] o = s.get_center_offset speak "s.get_center_offset #{o[0]}, #{o[1]}" end end
scene :scene_name do |sc| sc.on_init do s = sc.add :image, :name => :sprite_name, :template => :sprite_template_name, :position => [100, 100] s.event :on_click do |event| s.delete end end end
scene :scene_name do |sc| sc.on_init do s = sc.text :position => [10, 10] s.set_text "text" end end
scene :scene_name do |sc| sc.on_init do s = sc.text :position => [10, 10], :text => "text" speak s.get_text end end
scene :scene_name do |sc| sc.on_init do s = sc.text :position => [10, 10], :text => "text" s.set_font_point_size 12 end end
scene :scene_name do |sc| sc.on_init do s = sc.text :position => [10, 10], :text => "text" speak "font size #{s.get_font_point_size}" end end
scene :scene_name do |sc| sc.on_init do s = sc.text :position => [10, 10], :text => "text" s.set_font_kerning 2 end end
scene :scene_name do |sc| sc.on_init do s = sc.text :position => [10, 10], :text => "text" speak "get_font_kerning #{s.get_font_kerning}" end end
scene :scene_name do |sc| sc.on_init do s = sc.text :position => [10, 10], :text => "text" s.set_font_interline_spacing 2 end end
scene :scene_name do |sc| sc.on_init do s = sc.text :position => [10, 10], :text => "text" speak "get_font_interline_spacing #{s.get_font_interline_spacing}" end end
scene :scene_name do |sc| sc.on_init do s = sc.text :position => [10, 10], :text => "text" speak "get_font_line_height #{s.get_font_line_height}" end end
scene :scene_name do |sc| sc.on_init do s = sc.text :position => [10, 10], :text => "text" sz = s.get_text_draw_size speak "get_text_draw_size #{sz[0]}, #{sz[1]}" end end
scene :scene_name do |sc| sc.on_init do s = sc.text :position => [10, 10], :text => "text" speak "get_text_draw_target #{s.get_text_draw_target}" end end
scene :scene_name do |sc| sc.on_init do s = sc.sprite :position => [10, 10], :template => :sprite_template_name s.change_motion :motion_name end end
scene :scene_name do |sc| sc.on_init do s = sc.sprite :position => [10, 10], :template => :sprite_template_name s.change_animation :motion_name end end
scene :scene_name do |sc| sc.on_init do s = sc.text :position => [10, 10], :template => :sprite_template_name s.set_text_area_size 100, 50 end end
scene :scene_name do |sc| sc.on_init do s = sc.text :position => [10, 10], :text => "text" sz = s.get_text_area_size speak "get_text_area_size #{sz[0]}, #{sz[1]}" end end
scene :scene_name do |sc| sc.on_init do s = sc.sprite :position => [10, 10], :template => :sprite_template_name s.collision :circle, :mode => :center, :position => [0, 0], :radius => 4, :group_id => 1 end end
scene :scene_name do |sc| sc.on_init do s = sc.sprite :position => [10, 10], :template => :sprite_template_name s.collision :rect, :position => [0, 0], :width => [16, 16], :group_id => 0 end end
scene :scene_name do |sc| sc.on_init do s = sc.sprite :position => [10, 10], :template => :sprite_template_name s.collision :circle, :mode => :center, :position => [0, 0], :radius => 4, :group_id => 1 end end
scene :start_scene do |scene| scene.loading do |loader| loader.add :texture_name, 8 end scene.on_init do s = scene.sprite :texture => :texture_name, :position => [10, 10] speak "#{s.get_texture_name}" end end
scene :start_scene do |scene| scene.loading do |loader| loader.add :texture_name, 8 end scene.on_init do sprite = scene.sprite :texture => :texture_name, :center_position => [30 + 128, 30] positions = [ # 1つ目の三角形 0.0, 0.0, # x座標, y座標 128.0, 0.0, 0.0, 128.0, # 2つ目の三角形 0.0, 128.0, 128.0, 0.0, 128.0, 128.0 ] colors = [ # 1つ目の三角形 255, 255, 255, 255, # 赤、緑、青、不透明度の順 255, 0, 0, 255, 0, 255, 0, 255, # 2つ目の三角形 0, 255, 0, 255, 255, 0, 0, 255, 0, 0, 255, 255 ] uvs = [ # 1つ目の三角形 0.0, 0.0, # u座標, v座標 1.0, 0.0, 0.0, 1.0, # 2つ目の三角形 0.0, 1.0, 1.0, 0.0, 1.0, 1.0 ] sprite.set_triangles positions, colors, uvs end end
scene :start_scene do |scene| scene.loading do |loader| loader.add :texture_name, 8 end scene.on_init do sprite = scene.sprite :texture => :texture_name, :center_position => [30 + 128, 30] positions = [ # 1つ目の線分 0.0, 0.0, # x座標, y座標 128.0, 0.0, # 2つ目の線分 0.0, 128.0, 128.0, 0.0 ] colors = [ # 1つ目の線分 255, 255, 255, 255, # 赤、緑、青、不透明度の順 255, 0, 0, 255, # 2つ目の線分 0, 255, 0, 255, 255, 0, 0, 255 ] sprite.set_lines positions, colors end end
scene :start_scene do |scene| scene.loading do |loader| loader.add :texture_name, 8 end scene.on_init do sprite = scene.sprite :texture => :texture_name, :center_position => [30 + 128, 30] dest_rects = [ # 1つ目のコピー先の矩形 0, 0, 128, 128, # x座標、y座標、幅、高さ # 2つ目のコピー先の矩形 0, 128 + 8, 128, 128 ] colors = [ # 1つ目の矩形の色 255, 255, 255, 255, # 赤、緑、青、不透明度の順 # 2つ目の矩形の色 255, 255, 255, 255 ] src_rects = [ # 1つ目のコピー元の矩形 0.0, 0.0, 128.0, 128.0, # x座標、y座標、幅、高さ # 2つ目のコピー元の矩形 128.0, 0.0, 128.0, 128.0 ] sprite.set_rects dest_rects, colors, src_rects end end
scene :start_scene do |scene| ... scene.on_init do s = scene.sprite :template => :texture_name, :position => [210, 200], :render_way_type => :add s.set_render_way_type :add end end
scene :start_scene do |scene| ... scene.on_init do parent_sprite = scene.sprite :texture => :texture_name, :center_position => [400 + 0, 225 + -32] child_sprite = scene.sprite :texture => :texture_name, :position => [0, -32] parent_sprite.add_child child_sprite end end
scene :start_scene do |scene| ... scene.on_init do parent_sprite = scene.sprite :texture => :texture_name, :center_position => [400 + 0, 225 + -32] child_sprite = scene.sprite :texture => :texture_name, :position => [0, -32] parent_sprite.add_child child_sprite child_sprite.remove_from_parent end end
scene :start_scene do |scene| ... scene.on_init do sprite = scene.sprite :texture => :texture_name sprite.set_visible false end end
scene :start_scene do |scene| ... scene.on_init do sprite = scene.sprite :texture => :texture_name speak sprite.get_visible end end
scene :start_scene do |scene| ... scene.on_init do s7 = scene.sprite :texture => :enemy, :center_position => [400 - 200, 225 + -32] s8 = scene.sprite :texture => :enemy, :position => [0, 32] s7.add_child s8 s7.set_data :name, "s7" s8.set_data :name, "s8" speak "s8.parent name -> #{s8.get_parent.get_data :name}" end end
scene :start_scene do |scene| ... scene.on_init do s7 = scene.sprite :texture => :enemy, :center_position => [400 - 200, 225 + -32] s8 = scene.sprite :texture => :enemy, :position => [0, 32] s7.add_child s8 s7.set_data :name, "s7" s8.set_data :name, "s8" str = "" s7.get_children.each do |s| str += "#{s.get_data :name} " end speak "s7.children name -> #{str}" end end
2014/03/04 ver. 0.1.39 を公開しました!
・0.1.36でWindowsで起動しない問題を修正しました
(Android版はバージョン番号のみの変更です。)
2014/03/04 ver. 0.1.36 を公開しました!
・アプリケーションアイコンを変更しました
・セーブ・ロードを繰り返すとアプリが強制終了する問題を修正しました
・他、重大なバグを修正しました
ダウンロードはこちらから。
2013/07/17 Code on Rmakeをα公開しました!