smalruby-editor 0.3.5-x86-mingw32 → 0.4.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of smalruby-editor might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/.rspec +0 -0
- data/.rubocop.yml +1 -0
- data/.simplecov +7 -7
- data/.travis.yml +0 -0
- data/Guardfile +1 -1
- data/LICENSE +0 -0
- data/Procfile +1 -1
- data/Rakefile +0 -0
- data/app/assets/images/.keep +0 -0
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/javascripts/blocks/blockly.js.coffee.erb +0 -0
- data/app/assets/javascripts/blocks/character.js.coffee.erb +3 -0
- data/app/assets/javascripts/blocks/data.js.coffee.erb +0 -0
- data/app/assets/javascripts/blocks/etc.js.coffee.erb +0 -0
- data/app/assets/javascripts/blocks/field_character.js.coffee.erb +13 -1
- data/app/assets/javascripts/blocks/field_costume.js.coffee.erb +84 -0
- data/app/assets/javascripts/blocks/hardware.js.coffee.erb +26 -0
- data/app/assets/javascripts/blocks/looks.js.coffee.erb +32 -0
- data/app/assets/javascripts/collections/.keep +0 -0
- data/app/assets/javascripts/collections/character_set.js.coffee +0 -0
- data/app/assets/javascripts/generators/ruby.js.coffee.erb +10 -1
- data/app/assets/javascripts/models/.keep +0 -0
- data/app/assets/javascripts/models/character.js.coffee +45 -6
- data/app/assets/javascripts/models/scene.js.coffee +0 -0
- data/app/assets/javascripts/msg/en_us.js +4 -0
- data/app/assets/javascripts/msg/ja.js +4 -0
- data/app/assets/javascripts/routers/.keep +0 -0
- data/app/assets/javascripts/smalruby.js.coffee.erb +5 -1
- data/app/assets/javascripts/views/.keep +0 -0
- data/app/assets/javascripts/views/character_modal_view.js.coffee.erb +357 -0
- data/app/assets/javascripts/views/character_selector_view.js.coffee +2 -0
- data/app/assets/stylesheets/editor.css.scss +201 -16
- data/app/assets/stylesheets/flatstrap-custom.css.scss +0 -0
- data/app/assets/stylesheets/load-modal.css.scss +0 -0
- data/app/assets/templates/.keep +0 -0
- data/app/controllers/application_controller.rb +8 -2
- data/app/controllers/concerns/.keep +0 -0
- data/app/controllers/costumes_controller.rb +58 -0
- data/app/controllers/editor_controller.rb +2 -0
- data/app/helpers/costumes_helper.rb +2 -0
- data/app/helpers/editor_helper.rb +0 -0
- data/app/helpers/sessions_helper.rb +0 -4
- data/app/mailers/.keep +0 -0
- data/app/models/.keep +0 -0
- data/app/models/concerns/.keep +0 -0
- data/app/models/concerns/ruby_to_block.rb +0 -0
- data/app/models/concerns/ruby_to_block/block.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/base.rb +2 -0
- data/app/models/concerns/ruby_to_block/block/character.rb +32 -11
- data/app/models/concerns/ruby_to_block/block/character_event.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/character_method_call.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/character_new.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/character_operation.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/control_beark.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/control_if.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/control_loop.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/control_sleep.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/do.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/else.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/end.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/events_on_click.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/events_on_key_push_or_down.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/events_on_start.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/hardware_button_pressed_or_released.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/hardware_init_hardware.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/hardware_led_turn_off.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/hardware_led_turn_on.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/hardware_motor_driver_set_speed.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/hardware_motor_driver_speed.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/hardware_neo_pixel_set_rgb.rb +31 -0
- data/app/models/concerns/ruby_to_block/block/hardware_rgb_led_set_color.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/hardware_rgb_led_turn_off.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/hardware_sensor_value.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/hardware_two_wheel_drive_car.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/hardware_two_wheel_drive_car_commands.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/hardware_two_wheel_drive_car_run.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/hardware_two_wheel_drive_car_set_speed.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/hardware_two_wheel_drive_car_speed.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/looks_hide.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/looks_next_costume.rb +12 -0
- data/app/models/concerns/ruby_to_block/block/looks_say.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/looks_show.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/looks_switch_costume.rb +22 -0
- data/app/models/concerns/ruby_to_block/block/looks_vanish.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/math_number.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_change_x_by.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_change_y_by.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_go_to_character.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_go_to_mouse.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_move.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_point_towards_character.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_point_towards_mouse.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_rotate_left.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_rotate_right.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_self_angle.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_self_x.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_self_y.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_set_angle.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_set_x.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_set_x_y.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_set_y.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_turn.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_turn_if_reach_wall.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/motion_turn_xy.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/null.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/operators_compare.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/operators_false.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/operators_true.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/require_smalruby.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/ruby_comment.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/ruby_expression.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/ruby_p.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/ruby_statement.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/sensing_hit.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/sensing_reach_wall.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/sound_play.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/sound_preset_sounds.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/text.rb +0 -0
- data/app/models/concerns/ruby_to_block/block/value.rb +0 -0
- data/app/models/concerns/ruby_to_block/context.rb +0 -0
- data/app/models/concerns/ruby_to_block/formatter.rb +0 -0
- data/app/models/costume.rb +67 -0
- data/app/models/source_code.rb +9 -1
- data/app/models/user.rb +7 -0
- data/app/views/costumes/index.html.haml +19 -0
- data/app/views/editor/_character_modal.html.haml +35 -7
- data/app/views/editor/_toolbox_default.html.haml +9 -0
- data/app/views/editor/demo.html.erb +0 -0
- data/app/views/editor/index.html.haml +1 -0
- data/bin/smalruby-editor +1 -0
- data/bin/spring +7 -9
- data/config.ru +0 -0
- data/config/boot.rb +0 -0
- data/config/database.yml.mysql2 +0 -0
- data/config/database.yml.sqlite3 +0 -0
- data/config/database.yml.travis +0 -0
- data/config/environment.rb +0 -0
- data/config/environments/development.rb +0 -0
- data/config/environments/production.rb +0 -0
- data/config/environments/standalone.rb +0 -0
- data/config/environments/test.rb +0 -0
- data/config/initializers/backtrace_silencers.rb +0 -0
- data/config/initializers/filter_parameter_logging.rb +0 -0
- data/config/initializers/inflections.rb +0 -0
- data/config/initializers/mime_types.rb +0 -0
- data/config/initializers/secret_token.rb +0 -0
- data/config/initializers/session_store.rb +0 -0
- data/config/initializers/teaspoon.rb +0 -0
- data/config/initializers/wrap_parameters.rb +0 -0
- data/config/locales/en.yml +10 -1
- data/config/locales/ja.yml +10 -0
- data/config/routes.rb +2 -0
- data/config/unicorn.rb +23 -23
- data/db/migrate/20131216121603_create_source_codes.rb +0 -0
- data/db/migrate/20131219045113_add_filename_to_source_code.rb +0 -0
- data/db/migrate/20150513061250_add_index_name_on_users.rb +1 -1
- data/db/migrate/20150607012053_create_costumes.rb +12 -0
- data/db/migrate/20150607012707_add_indexes_on_costumes.rb +13 -0
- data/db/migrate/20150607034013_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +31 -0
- data/db/migrate/20150607034014_add_missing_unique_indices.acts_as_taggable_on_engine.rb +21 -0
- data/db/migrate/20150607034015_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +15 -0
- data/db/migrate/20150607034016_add_missing_taggable_index.acts_as_taggable_on_engine.rb +10 -0
- data/db/migrate/20150607034017_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +12 -0
- data/db/migrate/20150607034018_insert_preset_costumes.rb +9 -0
- data/db/schema.rb +35 -2
- data/db/seeds.rb +2 -0
- data/demos/car_chase.rb.xml +128 -128
- data/demos/pong.rb.xml +379 -379
- data/demos/star.rb.xml +115 -115
- data/lib/assets/.keep +0 -0
- data/lib/smalruby_editor/version.rb +1 -1
- data/lib/tasks/.keep +0 -0
- data/lib/tasks/gem.rake +0 -0
- data/lib/tasks/rspec.rake +0 -0
- data/lib/tasks/rubocop.rake +0 -0
- data/log/.keep +0 -0
- data/public/404.html +0 -0
- data/public/422.html +0 -0
- data/public/500.html +0 -0
- data/public/apple-touch-icon.png +0 -0
- data/public/blockly/media/1x1.gif +0 -0
- data/public/blockly/media/click.mp3 +0 -0
- data/public/blockly/media/click.ogg +0 -0
- data/public/blockly/media/click.wav +0 -0
- data/public/blockly/media/delete.mp3 +0 -0
- data/public/blockly/media/delete.ogg +0 -0
- data/public/blockly/media/delete.wav +0 -0
- data/public/blockly/media/handopen.cur +0 -0
- data/public/blockly/media/quote0.png +0 -0
- data/public/blockly/media/quote1.png +0 -0
- data/public/browserconfig.xml +0 -0
- data/public/fonts/FontAwesome.otf +0 -0
- data/public/fonts/fontawesome-webfont.eot +0 -0
- data/public/fonts/fontawesome-webfont.ttf +0 -0
- data/public/fonts/fontawesome-webfont.woff +0 -0
- data/public/large.png +0 -0
- data/public/robots.txt +0 -0
- data/public/smalruby/assets/ball1.png +0 -0
- data/public/smalruby/assets/ball2.png +0 -0
- data/public/smalruby/assets/ball3.png +0 -0
- data/public/smalruby/assets/ball4.png +0 -0
- data/public/smalruby/assets/ball5.png +0 -0
- data/public/smalruby/assets/ball6.png +0 -0
- data/public/smalruby/assets/car1.png +0 -0
- data/public/smalruby/assets/car2.png +0 -0
- data/public/smalruby/assets/car3.png +0 -0
- data/public/smalruby/assets/car4.png +0 -0
- data/public/smalruby/assets/cat1.png +0 -0
- data/public/smalruby/assets/cat2.png +0 -0
- data/public/smalruby/assets/cat3.png +0 -0
- data/public/smalruby/assets/frog1.png +0 -0
- data/public/smalruby/assets/piano_do.wav +0 -0
- data/public/smalruby/assets/piano_do_2.wav +0 -0
- data/public/smalruby/assets/piano_fa.wav +0 -0
- data/public/smalruby/assets/piano_mi.wav +0 -0
- data/public/smalruby/assets/piano_ra.wav +0 -0
- data/public/smalruby/assets/piano_re.wav +0 -0
- data/public/smalruby/assets/piano_si.wav +0 -0
- data/public/smalruby/assets/piano_so.wav +0 -0
- data/public/smalruby/assets/ryu1.png +0 -0
- data/public/smalruby/assets/ryu2.png +0 -0
- data/public/smalruby/assets/taichi1.png +0 -0
- data/public/smalruby/assets/taichi2.png +0 -0
- data/public/square.png +0 -0
- data/public/tiny.png +0 -0
- data/public/wide.png +0 -0
- data/smalruby-editor.gemspec +2 -1
- data/spec/acceptance/block_mode/blocks/character/new.feature +5 -5
- data/spec/acceptance/block_mode/blocks/control/await.feature +2 -2
- data/spec/acceptance/block_mode/blocks/control/await_until.feature +3 -3
- data/spec/acceptance/block_mode/blocks/control/break.feature +0 -0
- data/spec/acceptance/block_mode/blocks/control/if.feature +0 -0
- data/spec/acceptance/block_mode/blocks/control/if_else.feature +0 -0
- data/spec/acceptance/block_mode/blocks/control/loop.feature +0 -0
- data/spec/acceptance/block_mode/blocks/control/next.feature +0 -0
- data/spec/acceptance/block_mode/blocks/control/redo.feature +0 -0
- data/spec/acceptance/block_mode/blocks/control/sleep.feature +0 -0
- data/spec/acceptance/block_mode/blocks/control/times.feature +0 -0
- data/spec/acceptance/block_mode/blocks/control/until.feature +0 -0
- data/spec/acceptance/block_mode/blocks/events/on_click.feature +2 -2
- data/spec/acceptance/block_mode/blocks/events/on_hit.feature +4 -4
- data/spec/acceptance/block_mode/blocks/events/on_key_push_or_down.feature +4 -4
- data/spec/acceptance/block_mode/blocks/events/on_start.feature +2 -2
- data/spec/acceptance/block_mode/blocks/hardware/init_hardware.feature +1 -1
- data/spec/acceptance/block_mode/blocks/hardware/led_turn_off.feature +2 -2
- data/spec/acceptance/block_mode/blocks/hardware/led_turn_on.feature +2 -2
- data/spec/acceptance/block_mode/blocks/hardware/motor_driver.feature +0 -0
- data/spec/acceptance/block_mode/blocks/hardware/motor_driver_speed.feature +0 -0
- data/spec/acceptance/block_mode/blocks/hardware/neo_pixel_set_rgb.feature +100 -0
- data/spec/acceptance/block_mode/blocks/hardware/rgb_led_set_color.feature +0 -0
- data/spec/acceptance/block_mode/blocks/hardware/rgb_led_turn_off.feature +0 -0
- data/spec/acceptance/block_mode/blocks/hardware/sensor_value.feature +0 -0
- data/spec/acceptance/block_mode/blocks/hardware/servo_set_position.feature +0 -0
- data/spec/acceptance/block_mode/blocks/hardware/smalrubot_s1_action_with_sec.feature +1 -1
- data/spec/acceptance/block_mode/blocks/hardware/smalrubot_s1_led_turn_on_or_off.feature +1 -1
- data/spec/acceptance/block_mode/blocks/hardware/smalrubot_v3_action_with_sec.feature +1 -1
- data/spec/acceptance/block_mode/blocks/hardware/two_wheel_drive_car.feature +0 -0
- data/spec/acceptance/block_mode/blocks/hardware/two_wheel_drive_car_speed.feature +0 -0
- data/spec/acceptance/block_mode/blocks/looks/hide.feature +2 -2
- data/spec/acceptance/block_mode/blocks/looks/next_costume.feature +56 -0
- data/spec/acceptance/block_mode/blocks/looks/say.feature +3 -3
- data/spec/acceptance/block_mode/blocks/looks/show.feature +2 -2
- data/spec/acceptance/block_mode/blocks/looks/vanish.feature +2 -2
- data/spec/acceptance/block_mode/blocks/motion/change_x_by.feature +2 -2
- data/spec/acceptance/block_mode/blocks/motion/change_y_by.feature +2 -2
- data/spec/acceptance/block_mode/blocks/motion/move.feature +2 -2
- data/spec/acceptance/block_mode/blocks/motion/reach_wall.feature +2 -2
- data/spec/acceptance/block_mode/blocks/motion/rotate_left.feature +2 -2
- data/spec/acceptance/block_mode/blocks/motion/rotate_right.feature +2 -2
- data/spec/acceptance/block_mode/blocks/motion/self_angle.feature +2 -2
- data/spec/acceptance/block_mode/blocks/motion/self_x.feature +2 -2
- data/spec/acceptance/block_mode/blocks/motion/self_y.feature +2 -2
- data/spec/acceptance/block_mode/blocks/motion/set_angle.feature +2 -2
- data/spec/acceptance/block_mode/blocks/motion/set_x.feature +2 -2
- data/spec/acceptance/block_mode/blocks/motion/set_x_y.feature +2 -2
- data/spec/acceptance/block_mode/blocks/motion/set_y.feature +2 -2
- data/spec/acceptance/block_mode/blocks/motion/turn.feature +2 -2
- data/spec/acceptance/block_mode/blocks/motion/turn_if_reach_wall.feature +2 -2
- data/spec/acceptance/block_mode/blocks/operators/and_or.feature +0 -0
- data/spec/acceptance/block_mode/blocks/operators/four_arithmetic_and_compares.feature +0 -0
- data/spec/acceptance/block_mode/blocks/operators/index_of.feature +0 -0
- data/spec/acceptance/block_mode/blocks/operators/length.feature +0 -0
- data/spec/acceptance/block_mode/blocks/operators/math_method.feature +0 -0
- data/spec/acceptance/block_mode/blocks/operators/negate.feature +0 -0
- data/spec/acceptance/block_mode/blocks/operators/rand.feature +0 -0
- data/spec/acceptance/block_mode/blocks/operators/round.feature +0 -0
- data/spec/acceptance/block_mode/blocks/operators/text.feature +0 -0
- data/spec/acceptance/block_mode/blocks/operators/true_false.feature +0 -0
- data/spec/acceptance/block_mode/blocks/ruby/expression.feature +0 -0
- data/spec/acceptance/block_mode/blocks/ruby/p.feature +0 -0
- data/spec/acceptance/block_mode/blocks/ruby/statement_comment.feature +0 -0
- data/spec/acceptance/block_mode/blocks/sensing/character_property.feature +2 -2
- data/spec/acceptance/block_mode/blocks/sensing/hit.feature +6 -6
- data/spec/acceptance/block_mode/blocks/sensing/input_key_push_or_down.feature +0 -0
- data/spec/acceptance/block_mode/blocks/sensing/input_mouse_pos_x.feature +0 -0
- data/spec/acceptance/block_mode/blocks/sensing/input_mouse_pos_y.feature +0 -0
- data/spec/acceptance/block_mode/blocks/sensing/input_mouse_push_or_down.feature +0 -0
- data/spec/acceptance/block_mode/blocks/sensing/reach_wall.feature +2 -2
- data/spec/acceptance/block_mode/blocks/sensing/time_now.feature +0 -0
- data/spec/acceptance/block_mode/blocks/sound/play.feature +2 -2
- data/spec/acceptance/block_mode/character_modal_view.feature +164 -0
- data/spec/acceptance/block_mode/demo.feature +2 -2
- data/spec/acceptance/block_mode/translate.feature +0 -0
- data/spec/acceptance/readme.md +0 -0
- data/spec/acceptance/ruby_mode/check.feature +0 -0
- data/spec/acceptance/ruby_mode/load.feature +0 -0
- data/spec/acceptance/ruby_mode/translate.feature +2 -2
- data/spec/acceptance/standalone/preference.feature +8 -8
- data/spec/acceptance/standalone/run.feature +0 -0
- data/spec/acceptance/standalone/save.feature +1 -1
- data/spec/acceptance/standalone/signin.feature +1 -1
- data/spec/controllers/source_codes_controller_spec.rb +0 -0
- data/spec/fixtures/files/01.rb +0 -0
- data/spec/fixtures/files/01.rb.xml +0 -0
- data/spec/fixtures/files/01_remix.rb +0 -0
- data/spec/fixtures/files/01_remix02.rb +0 -0
- data/spec/fixtures/files/01_remix10.rb.xml +0 -0
- data/spec/fixtures/files/extra_car.png +0 -0
- data/spec/fixtures/files/favicon.ico +0 -0
- data/spec/helpers/editor_helper_spec.rb +0 -0
- data/spec/javascripts/collections/character_set_spec.coffee +0 -0
- data/spec/javascripts/models/character_spec.coffee +2 -14
- data/spec/javascripts/models/scene_spec.coffee +0 -0
- data/spec/javascripts/spec_helper.js +0 -0
- data/spec/lib/smalruby_editor_spec.rb +0 -0
- data/spec/models/concerns/ruby_to_block/block/character_method_call_spec.rb +0 -0
- data/spec/models/concerns/ruby_to_block/block/character_spec.rb +71 -0
- data/spec/models/concerns/ruby_to_block/block/control_if_spec.rb +0 -0
- data/spec/models/concerns/ruby_to_block/block/control_loop_spec.rb +0 -0
- data/spec/models/concerns/ruby_to_block/block/events_on_start_spec.rb +6 -6
- data/spec/models/concerns/ruby_to_block/block/hardware__neo_pixel_spec.rb +77 -0
- data/spec/models/concerns/ruby_to_block/block/looks_say_spec.rb +0 -0
- data/spec/models/concerns/ruby_to_block/block/looks_spec.rb +26 -2
- data/spec/models/concerns/ruby_to_block/block/motion_move_spec.rb +0 -0
- data/spec/models/concerns/ruby_to_block/block/motion_spec.rb +0 -0
- data/spec/models/concerns/ruby_to_block/block/motion_turn_spec.rb +0 -0
- data/spec/models/concerns/ruby_to_block/block/motion_turn_xy_spec.rb +0 -0
- data/spec/models/concerns/ruby_to_block/block/require_smalruby_spec.rb +0 -0
- data/spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb +0 -0
- data/spec/models/concerns/ruby_to_block/block/ruby_statement_spec.rb +0 -0
- data/spec/models/concerns/ruby_to_block/block/sensing_reach_wall_spec.rb +0 -0
- data/spec/models/concerns/ruby_to_block/block/shared/block_examples.rb +2 -2
- data/spec/models/concerns/ruby_to_block/block/sound_spec.rb +0 -0
- data/spec/models/concerns/ruby_to_block/block/text_spec.rb +0 -0
- data/spec/models/concerns/ruby_to_block/block_spec.rb +0 -0
- data/spec/models/concerns/ruby_to_block_spec.rb +0 -0
- data/spec/spec_helper.rb +21 -10
- data/spec/steps/block_mode_steps.rb +0 -0
- data/spec/steps/fix_turnip.rb +0 -0
- data/spec/steps/global_variable.rb +0 -0
- data/spec/steps/standalone_steps.rb +3 -3
- data/spec/steps/then_steps.rb +28 -0
- data/spec/steps/when_steps.rb +15 -18
- data/spec/support/capybara.rb +0 -0
- data/spec/support/env.rb +0 -0
- data/spec/support/ruby_to_block.rb +0 -0
- data/spec/teaspoon_env.rb +0 -0
- data/spec/turnip_helper.rb +0 -0
- data/vendor/assets/javascripts/.keep +0 -0
- data/vendor/assets/javascripts/jquery.blockUI.js +0 -0
- data/vendor/assets/stylesheets/.keep +0 -0
- metadata +56 -14
- data/app/assets/javascripts/views/character_modal_view.js.coffee +0 -194
data/demos/pong.rb.xml
CHANGED
@@ -1,380 +1,380 @@
|
|
1
|
-
<xml xmlns="http://www.w3.org/1999/xhtml">
|
2
|
-
<character x="0" y="0" name="cat1" costumes="cat2.png" angle="0" rotation_style="left_right"></character>
|
3
|
-
<character x="544" y="0" name="frog1" costumes="frog1.png" angle="180" rotation_style="left_right"></character>
|
4
|
-
<character x="304" y="184" name="ball1" costumes="ball6.png" angle="225" rotation_style="left_right"></character>
|
5
|
-
<block type="ruby_comment" x="-24" y="-222">
|
6
|
-
<field name="COMMENT">ピンポンゲーム</field>
|
7
|
-
</block>
|
8
|
-
<block type="variables_set" inline="false" x="-25" y="-180">
|
9
|
-
<field name="VAR">プレイ中</field>
|
10
|
-
<value name="VALUE">
|
11
|
-
<block type="operators_true"></block>
|
12
|
-
</value>
|
13
|
-
<next>
|
14
|
-
<block type="variables_set" inline="false">
|
15
|
-
<field name="VAR">回数</field>
|
16
|
-
<value name="VALUE">
|
17
|
-
<block type="math_number">
|
18
|
-
<field name="NUM">0</field>
|
19
|
-
</block>
|
20
|
-
</value>
|
21
|
-
</block>
|
22
|
-
</next>
|
23
|
-
</block>
|
24
|
-
<block type="character_new" x="-19" y="-102">
|
25
|
-
<field name="NAME">cat1</field>
|
26
|
-
<statement name="DO">
|
27
|
-
<block type="events_on_start">
|
28
|
-
<statement name="DO">
|
29
|
-
<block type="control_loop">
|
30
|
-
<statement name="DO">
|
31
|
-
<block type="looks_say" inline="true">
|
32
|
-
<value name="TEXT">
|
33
|
-
<block type="variables_get">
|
34
|
-
<field name="VAR">回数</field>
|
35
|
-
</block>
|
36
|
-
</value>
|
37
|
-
</block>
|
38
|
-
</statement>
|
39
|
-
</block>
|
40
|
-
</statement>
|
41
|
-
<next>
|
42
|
-
<block type="events_on_key_push_or_down">
|
43
|
-
<field name="KEY">K_UP</field>
|
44
|
-
<field name="POD">down</field>
|
45
|
-
<statement name="DO">
|
46
|
-
<block type="motion_change_y_by" inline="true">
|
47
|
-
<value name="Y">
|
48
|
-
<block type="math_number">
|
49
|
-
<field name="NUM">-20</field>
|
50
|
-
</block>
|
51
|
-
</value>
|
52
|
-
</block>
|
53
|
-
</statement>
|
54
|
-
<next>
|
55
|
-
<block type="events_on_key_push_or_down">
|
56
|
-
<field name="KEY">K_DOWN</field>
|
57
|
-
<field name="POD">down</field>
|
58
|
-
<statement name="DO">
|
59
|
-
<block type="motion_change_y_by" inline="true">
|
60
|
-
<value name="Y">
|
61
|
-
<block type="math_number">
|
62
|
-
<field name="NUM">20</field>
|
63
|
-
</block>
|
64
|
-
</value>
|
65
|
-
</block>
|
66
|
-
</statement>
|
67
|
-
</block>
|
68
|
-
</next>
|
69
|
-
</block>
|
70
|
-
</next>
|
71
|
-
</block>
|
72
|
-
</statement>
|
73
|
-
</block>
|
74
|
-
<block type="character_new" x="591" y="-100">
|
75
|
-
<field name="NAME">ball1</field>
|
76
|
-
<statement name="DO">
|
77
|
-
<block type="events_on_start">
|
78
|
-
<statement name="DO">
|
79
|
-
<block type="control_loop">
|
80
|
-
<statement name="DO">
|
81
|
-
<block type="motion_move" inline="true">
|
82
|
-
<value name="STEP">
|
83
|
-
<block type="operators_add" inline="true">
|
84
|
-
<value name="A">
|
85
|
-
<block type="math_number">
|
86
|
-
<field name="NUM">10</field>
|
87
|
-
</block>
|
88
|
-
</value>
|
89
|
-
<value name="B">
|
90
|
-
<block type="variables_get">
|
91
|
-
<field name="VAR">回数</field>
|
92
|
-
</block>
|
93
|
-
</value>
|
94
|
-
</block>
|
95
|
-
</value>
|
96
|
-
<next>
|
97
|
-
<block type="motion_turn_if_reach_wall">
|
98
|
-
<next>
|
99
|
-
<block type="control_if" inline="true">
|
100
|
-
<value name="COND">
|
101
|
-
<block type="operators_compare_gte" inline="true">
|
102
|
-
<value name="A">
|
103
|
-
<block type="sensing_character_property">
|
104
|
-
<field name="CHAR">ball1</field>
|
105
|
-
<field name="PROPERTY">x</field>
|
106
|
-
</block>
|
107
|
-
</value>
|
108
|
-
<value name="B">
|
109
|
-
<block type="math_number">
|
110
|
-
<field name="NUM">608</field>
|
111
|
-
</block>
|
112
|
-
</value>
|
113
|
-
</block>
|
114
|
-
</value>
|
115
|
-
<statement name="THEN">
|
116
|
-
<block type="looks_say" inline="true">
|
117
|
-
<value name="TEXT">
|
118
|
-
<block type="text">
|
119
|
-
<field name="TEXT">あなたの勝ち!</field>
|
120
|
-
</block>
|
121
|
-
</value>
|
122
|
-
<next>
|
123
|
-
<block type="variables_set" inline="false">
|
124
|
-
<field name="VAR">プレイ中</field>
|
125
|
-
<value name="VALUE">
|
126
|
-
<block type="operators_false"></block>
|
127
|
-
</value>
|
128
|
-
</block>
|
129
|
-
</next>
|
130
|
-
</block>
|
131
|
-
</statement>
|
132
|
-
<next>
|
133
|
-
<block type="control_if" inline="true">
|
134
|
-
<value name="COND">
|
135
|
-
<block type="operators_compare_lte" inline="true">
|
136
|
-
<value name="A">
|
137
|
-
<block type="sensing_character_property">
|
138
|
-
<field name="CHAR">ball1</field>
|
139
|
-
<field name="PROPERTY">x</field>
|
140
|
-
</block>
|
141
|
-
</value>
|
142
|
-
<value name="B">
|
143
|
-
<block type="math_number">
|
144
|
-
<field name="NUM">0</field>
|
145
|
-
</block>
|
146
|
-
</value>
|
147
|
-
</block>
|
148
|
-
</value>
|
149
|
-
<statement name="THEN">
|
150
|
-
<block type="looks_say" inline="true">
|
151
|
-
<value name="TEXT">
|
152
|
-
<block type="text">
|
153
|
-
<field name="TEXT">あなたの負け!</field>
|
154
|
-
</block>
|
155
|
-
</value>
|
156
|
-
<next>
|
157
|
-
<block type="variables_set" inline="false">
|
158
|
-
<field name="VAR">プレイ中</field>
|
159
|
-
<value name="VALUE">
|
160
|
-
<block type="operators_false"></block>
|
161
|
-
</value>
|
162
|
-
</block>
|
163
|
-
</next>
|
164
|
-
</block>
|
165
|
-
</statement>
|
166
|
-
<next>
|
167
|
-
<block type="control_if" inline="true">
|
168
|
-
<value name="COND">
|
169
|
-
<block type="operators_compare_eq" inline="true">
|
170
|
-
<value name="A">
|
171
|
-
<block type="variables_get">
|
172
|
-
<field name="VAR">プレイ中</field>
|
173
|
-
</block>
|
174
|
-
</value>
|
175
|
-
<value name="B">
|
176
|
-
<block type="operators_false"></block>
|
177
|
-
</value>
|
178
|
-
</block>
|
179
|
-
</value>
|
180
|
-
<statement name="THEN">
|
181
|
-
<block type="control_break"></block>
|
182
|
-
</statement>
|
183
|
-
</block>
|
184
|
-
</next>
|
185
|
-
</block>
|
186
|
-
</next>
|
187
|
-
</block>
|
188
|
-
</next>
|
189
|
-
</block>
|
190
|
-
</next>
|
191
|
-
</block>
|
192
|
-
</statement>
|
193
|
-
</block>
|
194
|
-
</statement>
|
195
|
-
<next>
|
196
|
-
<block type="events_on_hit">
|
197
|
-
<field name="CHAR">cat1</field>
|
198
|
-
<statement name="DO">
|
199
|
-
<block type="variables_set" inline="false">
|
200
|
-
<field name="VAR">回数</field>
|
201
|
-
<value name="VALUE">
|
202
|
-
<block type="operators_add" inline="true">
|
203
|
-
<value name="A">
|
204
|
-
<block type="variables_get">
|
205
|
-
<field name="VAR">回数</field>
|
206
|
-
</block>
|
207
|
-
</value>
|
208
|
-
<value name="B">
|
209
|
-
<block type="math_number">
|
210
|
-
<field name="NUM">1</field>
|
211
|
-
</block>
|
212
|
-
</value>
|
213
|
-
</block>
|
214
|
-
</value>
|
215
|
-
<next>
|
216
|
-
<block type="motion_turn_xy">
|
217
|
-
<field name="XY">x</field>
|
218
|
-
<next>
|
219
|
-
<block type="control_if" inline="true">
|
220
|
-
<value name="COND">
|
221
|
-
<block type="sensing_input_key_push_or_down">
|
222
|
-
<field name="KEY">K_UP</field>
|
223
|
-
<field name="POD">down</field>
|
224
|
-
</block>
|
225
|
-
</value>
|
226
|
-
<statement name="THEN">
|
227
|
-
<block type="motion_rotate_left" inline="true">
|
228
|
-
<value name="ANGLE">
|
229
|
-
<block type="math_number">
|
230
|
-
<field name="NUM">5</field>
|
231
|
-
</block>
|
232
|
-
</value>
|
233
|
-
</block>
|
234
|
-
</statement>
|
235
|
-
<next>
|
236
|
-
<block type="control_if" inline="true">
|
237
|
-
<value name="COND">
|
238
|
-
<block type="sensing_input_key_push_or_down">
|
239
|
-
<field name="KEY">K_DOWN</field>
|
240
|
-
<field name="POD">down</field>
|
241
|
-
</block>
|
242
|
-
</value>
|
243
|
-
<statement name="THEN">
|
244
|
-
<block type="motion_rotate_right" inline="true">
|
245
|
-
<value name="ANGLE">
|
246
|
-
<block type="math_number">
|
247
|
-
<field name="NUM">5</field>
|
248
|
-
</block>
|
249
|
-
</value>
|
250
|
-
</block>
|
251
|
-
</statement>
|
252
|
-
<next>
|
253
|
-
<block type="motion_set_x" inline="true">
|
254
|
-
<value name="X">
|
255
|
-
<block type="math_number">
|
256
|
-
<field name="NUM">100</field>
|
257
|
-
</block>
|
258
|
-
</value>
|
259
|
-
</block>
|
260
|
-
</next>
|
261
|
-
</block>
|
262
|
-
</next>
|
263
|
-
</block>
|
264
|
-
</next>
|
265
|
-
</block>
|
266
|
-
</next>
|
267
|
-
</block>
|
268
|
-
</statement>
|
269
|
-
<next>
|
270
|
-
<block type="events_on_hit">
|
271
|
-
<field name="CHAR">frog1</field>
|
272
|
-
<statement name="DO">
|
273
|
-
<block type="variables_set" inline="false">
|
274
|
-
<field name="VAR">回数</field>
|
275
|
-
<value name="VALUE">
|
276
|
-
<block type="operators_add" inline="true">
|
277
|
-
<value name="A">
|
278
|
-
<block type="variables_get">
|
279
|
-
<field name="VAR">回数</field>
|
280
|
-
</block>
|
281
|
-
</value>
|
282
|
-
<value name="B">
|
283
|
-
<block type="math_number">
|
284
|
-
<field name="NUM">1</field>
|
285
|
-
</block>
|
286
|
-
</value>
|
287
|
-
</block>
|
288
|
-
</value>
|
289
|
-
<next>
|
290
|
-
<block type="motion_turn_xy">
|
291
|
-
<field name="XY">x</field>
|
292
|
-
<next>
|
293
|
-
<block type="motion_set_x" inline="true">
|
294
|
-
<value name="X">
|
295
|
-
<block type="math_number">
|
296
|
-
<field name="NUM">510</field>
|
297
|
-
</block>
|
298
|
-
</value>
|
299
|
-
</block>
|
300
|
-
</next>
|
301
|
-
</block>
|
302
|
-
</next>
|
303
|
-
</block>
|
304
|
-
</statement>
|
305
|
-
</block>
|
306
|
-
</next>
|
307
|
-
</block>
|
308
|
-
</next>
|
309
|
-
</block>
|
310
|
-
</statement>
|
311
|
-
</block>
|
312
|
-
<block type="character_new" x="-15" y="271">
|
313
|
-
<field name="NAME">frog1</field>
|
314
|
-
<statement name="DO">
|
315
|
-
<block type="events_on_start">
|
316
|
-
<statement name="DO">
|
317
|
-
<block type="control_loop">
|
318
|
-
<statement name="DO">
|
319
|
-
<block type="control_if" inline="true">
|
320
|
-
<value name="COND">
|
321
|
-
<block type="operators_compare_eq" inline="true">
|
322
|
-
<value name="A">
|
323
|
-
<block type="variables_get">
|
324
|
-
<field name="VAR">プレイ中</field>
|
325
|
-
</block>
|
326
|
-
</value>
|
327
|
-
<value name="B">
|
328
|
-
<block type="operators_false"></block>
|
329
|
-
</value>
|
330
|
-
</block>
|
331
|
-
</value>
|
332
|
-
<statement name="THEN">
|
333
|
-
<block type="control_break"></block>
|
334
|
-
</statement>
|
335
|
-
<next>
|
336
|
-
<block type="control_if_else" inline="true">
|
337
|
-
<value name="COND">
|
338
|
-
<block type="operators_compare_gte" inline="true">
|
339
|
-
<value name="A">
|
340
|
-
<block type="sensing_character_property">
|
341
|
-
<field name="CHAR">frog1</field>
|
342
|
-
<field name="PROPERTY">y</field>
|
343
|
-
</block>
|
344
|
-
</value>
|
345
|
-
<value name="B">
|
346
|
-
<block type="sensing_character_property">
|
347
|
-
<field name="CHAR">ball1</field>
|
348
|
-
<field name="PROPERTY">y</field>
|
349
|
-
</block>
|
350
|
-
</value>
|
351
|
-
</block>
|
352
|
-
</value>
|
353
|
-
<statement name="THEN">
|
354
|
-
<block type="motion_change_y_by" inline="true">
|
355
|
-
<value name="Y">
|
356
|
-
<block type="math_number">
|
357
|
-
<field name="NUM">-15</field>
|
358
|
-
</block>
|
359
|
-
</value>
|
360
|
-
</block>
|
361
|
-
</statement>
|
362
|
-
<statement name="ELSE">
|
363
|
-
<block type="motion_change_y_by" inline="true">
|
364
|
-
<value name="Y">
|
365
|
-
<block type="math_number">
|
366
|
-
<field name="NUM">15</field>
|
367
|
-
</block>
|
368
|
-
</value>
|
369
|
-
</block>
|
370
|
-
</statement>
|
371
|
-
</block>
|
372
|
-
</next>
|
373
|
-
</block>
|
374
|
-
</statement>
|
375
|
-
</block>
|
376
|
-
</statement>
|
377
|
-
</block>
|
378
|
-
</statement>
|
379
|
-
</block>
|
1
|
+
<xml xmlns="http://www.w3.org/1999/xhtml">
|
2
|
+
<character x="0" y="0" name="cat1" costumes="cat2.png" angle="0" rotation_style="left_right"></character>
|
3
|
+
<character x="544" y="0" name="frog1" costumes="frog1.png" angle="180" rotation_style="left_right"></character>
|
4
|
+
<character x="304" y="184" name="ball1" costumes="ball6.png" angle="225" rotation_style="left_right"></character>
|
5
|
+
<block type="ruby_comment" x="-24" y="-222">
|
6
|
+
<field name="COMMENT">ピンポンゲーム</field>
|
7
|
+
</block>
|
8
|
+
<block type="variables_set" inline="false" x="-25" y="-180">
|
9
|
+
<field name="VAR">プレイ中</field>
|
10
|
+
<value name="VALUE">
|
11
|
+
<block type="operators_true"></block>
|
12
|
+
</value>
|
13
|
+
<next>
|
14
|
+
<block type="variables_set" inline="false">
|
15
|
+
<field name="VAR">回数</field>
|
16
|
+
<value name="VALUE">
|
17
|
+
<block type="math_number">
|
18
|
+
<field name="NUM">0</field>
|
19
|
+
</block>
|
20
|
+
</value>
|
21
|
+
</block>
|
22
|
+
</next>
|
23
|
+
</block>
|
24
|
+
<block type="character_new" x="-19" y="-102">
|
25
|
+
<field name="NAME">cat1</field>
|
26
|
+
<statement name="DO">
|
27
|
+
<block type="events_on_start">
|
28
|
+
<statement name="DO">
|
29
|
+
<block type="control_loop">
|
30
|
+
<statement name="DO">
|
31
|
+
<block type="looks_say" inline="true">
|
32
|
+
<value name="TEXT">
|
33
|
+
<block type="variables_get">
|
34
|
+
<field name="VAR">回数</field>
|
35
|
+
</block>
|
36
|
+
</value>
|
37
|
+
</block>
|
38
|
+
</statement>
|
39
|
+
</block>
|
40
|
+
</statement>
|
41
|
+
<next>
|
42
|
+
<block type="events_on_key_push_or_down">
|
43
|
+
<field name="KEY">K_UP</field>
|
44
|
+
<field name="POD">down</field>
|
45
|
+
<statement name="DO">
|
46
|
+
<block type="motion_change_y_by" inline="true">
|
47
|
+
<value name="Y">
|
48
|
+
<block type="math_number">
|
49
|
+
<field name="NUM">-20</field>
|
50
|
+
</block>
|
51
|
+
</value>
|
52
|
+
</block>
|
53
|
+
</statement>
|
54
|
+
<next>
|
55
|
+
<block type="events_on_key_push_or_down">
|
56
|
+
<field name="KEY">K_DOWN</field>
|
57
|
+
<field name="POD">down</field>
|
58
|
+
<statement name="DO">
|
59
|
+
<block type="motion_change_y_by" inline="true">
|
60
|
+
<value name="Y">
|
61
|
+
<block type="math_number">
|
62
|
+
<field name="NUM">20</field>
|
63
|
+
</block>
|
64
|
+
</value>
|
65
|
+
</block>
|
66
|
+
</statement>
|
67
|
+
</block>
|
68
|
+
</next>
|
69
|
+
</block>
|
70
|
+
</next>
|
71
|
+
</block>
|
72
|
+
</statement>
|
73
|
+
</block>
|
74
|
+
<block type="character_new" x="591" y="-100">
|
75
|
+
<field name="NAME">ball1</field>
|
76
|
+
<statement name="DO">
|
77
|
+
<block type="events_on_start">
|
78
|
+
<statement name="DO">
|
79
|
+
<block type="control_loop">
|
80
|
+
<statement name="DO">
|
81
|
+
<block type="motion_move" inline="true">
|
82
|
+
<value name="STEP">
|
83
|
+
<block type="operators_add" inline="true">
|
84
|
+
<value name="A">
|
85
|
+
<block type="math_number">
|
86
|
+
<field name="NUM">10</field>
|
87
|
+
</block>
|
88
|
+
</value>
|
89
|
+
<value name="B">
|
90
|
+
<block type="variables_get">
|
91
|
+
<field name="VAR">回数</field>
|
92
|
+
</block>
|
93
|
+
</value>
|
94
|
+
</block>
|
95
|
+
</value>
|
96
|
+
<next>
|
97
|
+
<block type="motion_turn_if_reach_wall">
|
98
|
+
<next>
|
99
|
+
<block type="control_if" inline="true">
|
100
|
+
<value name="COND">
|
101
|
+
<block type="operators_compare_gte" inline="true">
|
102
|
+
<value name="A">
|
103
|
+
<block type="sensing_character_property">
|
104
|
+
<field name="CHAR">ball1</field>
|
105
|
+
<field name="PROPERTY">x</field>
|
106
|
+
</block>
|
107
|
+
</value>
|
108
|
+
<value name="B">
|
109
|
+
<block type="math_number">
|
110
|
+
<field name="NUM">608</field>
|
111
|
+
</block>
|
112
|
+
</value>
|
113
|
+
</block>
|
114
|
+
</value>
|
115
|
+
<statement name="THEN">
|
116
|
+
<block type="looks_say" inline="true">
|
117
|
+
<value name="TEXT">
|
118
|
+
<block type="text">
|
119
|
+
<field name="TEXT">あなたの勝ち!</field>
|
120
|
+
</block>
|
121
|
+
</value>
|
122
|
+
<next>
|
123
|
+
<block type="variables_set" inline="false">
|
124
|
+
<field name="VAR">プレイ中</field>
|
125
|
+
<value name="VALUE">
|
126
|
+
<block type="operators_false"></block>
|
127
|
+
</value>
|
128
|
+
</block>
|
129
|
+
</next>
|
130
|
+
</block>
|
131
|
+
</statement>
|
132
|
+
<next>
|
133
|
+
<block type="control_if" inline="true">
|
134
|
+
<value name="COND">
|
135
|
+
<block type="operators_compare_lte" inline="true">
|
136
|
+
<value name="A">
|
137
|
+
<block type="sensing_character_property">
|
138
|
+
<field name="CHAR">ball1</field>
|
139
|
+
<field name="PROPERTY">x</field>
|
140
|
+
</block>
|
141
|
+
</value>
|
142
|
+
<value name="B">
|
143
|
+
<block type="math_number">
|
144
|
+
<field name="NUM">0</field>
|
145
|
+
</block>
|
146
|
+
</value>
|
147
|
+
</block>
|
148
|
+
</value>
|
149
|
+
<statement name="THEN">
|
150
|
+
<block type="looks_say" inline="true">
|
151
|
+
<value name="TEXT">
|
152
|
+
<block type="text">
|
153
|
+
<field name="TEXT">あなたの負け!</field>
|
154
|
+
</block>
|
155
|
+
</value>
|
156
|
+
<next>
|
157
|
+
<block type="variables_set" inline="false">
|
158
|
+
<field name="VAR">プレイ中</field>
|
159
|
+
<value name="VALUE">
|
160
|
+
<block type="operators_false"></block>
|
161
|
+
</value>
|
162
|
+
</block>
|
163
|
+
</next>
|
164
|
+
</block>
|
165
|
+
</statement>
|
166
|
+
<next>
|
167
|
+
<block type="control_if" inline="true">
|
168
|
+
<value name="COND">
|
169
|
+
<block type="operators_compare_eq" inline="true">
|
170
|
+
<value name="A">
|
171
|
+
<block type="variables_get">
|
172
|
+
<field name="VAR">プレイ中</field>
|
173
|
+
</block>
|
174
|
+
</value>
|
175
|
+
<value name="B">
|
176
|
+
<block type="operators_false"></block>
|
177
|
+
</value>
|
178
|
+
</block>
|
179
|
+
</value>
|
180
|
+
<statement name="THEN">
|
181
|
+
<block type="control_break"></block>
|
182
|
+
</statement>
|
183
|
+
</block>
|
184
|
+
</next>
|
185
|
+
</block>
|
186
|
+
</next>
|
187
|
+
</block>
|
188
|
+
</next>
|
189
|
+
</block>
|
190
|
+
</next>
|
191
|
+
</block>
|
192
|
+
</statement>
|
193
|
+
</block>
|
194
|
+
</statement>
|
195
|
+
<next>
|
196
|
+
<block type="events_on_hit">
|
197
|
+
<field name="CHAR">cat1</field>
|
198
|
+
<statement name="DO">
|
199
|
+
<block type="variables_set" inline="false">
|
200
|
+
<field name="VAR">回数</field>
|
201
|
+
<value name="VALUE">
|
202
|
+
<block type="operators_add" inline="true">
|
203
|
+
<value name="A">
|
204
|
+
<block type="variables_get">
|
205
|
+
<field name="VAR">回数</field>
|
206
|
+
</block>
|
207
|
+
</value>
|
208
|
+
<value name="B">
|
209
|
+
<block type="math_number">
|
210
|
+
<field name="NUM">1</field>
|
211
|
+
</block>
|
212
|
+
</value>
|
213
|
+
</block>
|
214
|
+
</value>
|
215
|
+
<next>
|
216
|
+
<block type="motion_turn_xy">
|
217
|
+
<field name="XY">x</field>
|
218
|
+
<next>
|
219
|
+
<block type="control_if" inline="true">
|
220
|
+
<value name="COND">
|
221
|
+
<block type="sensing_input_key_push_or_down">
|
222
|
+
<field name="KEY">K_UP</field>
|
223
|
+
<field name="POD">down</field>
|
224
|
+
</block>
|
225
|
+
</value>
|
226
|
+
<statement name="THEN">
|
227
|
+
<block type="motion_rotate_left" inline="true">
|
228
|
+
<value name="ANGLE">
|
229
|
+
<block type="math_number">
|
230
|
+
<field name="NUM">5</field>
|
231
|
+
</block>
|
232
|
+
</value>
|
233
|
+
</block>
|
234
|
+
</statement>
|
235
|
+
<next>
|
236
|
+
<block type="control_if" inline="true">
|
237
|
+
<value name="COND">
|
238
|
+
<block type="sensing_input_key_push_or_down">
|
239
|
+
<field name="KEY">K_DOWN</field>
|
240
|
+
<field name="POD">down</field>
|
241
|
+
</block>
|
242
|
+
</value>
|
243
|
+
<statement name="THEN">
|
244
|
+
<block type="motion_rotate_right" inline="true">
|
245
|
+
<value name="ANGLE">
|
246
|
+
<block type="math_number">
|
247
|
+
<field name="NUM">5</field>
|
248
|
+
</block>
|
249
|
+
</value>
|
250
|
+
</block>
|
251
|
+
</statement>
|
252
|
+
<next>
|
253
|
+
<block type="motion_set_x" inline="true">
|
254
|
+
<value name="X">
|
255
|
+
<block type="math_number">
|
256
|
+
<field name="NUM">100</field>
|
257
|
+
</block>
|
258
|
+
</value>
|
259
|
+
</block>
|
260
|
+
</next>
|
261
|
+
</block>
|
262
|
+
</next>
|
263
|
+
</block>
|
264
|
+
</next>
|
265
|
+
</block>
|
266
|
+
</next>
|
267
|
+
</block>
|
268
|
+
</statement>
|
269
|
+
<next>
|
270
|
+
<block type="events_on_hit">
|
271
|
+
<field name="CHAR">frog1</field>
|
272
|
+
<statement name="DO">
|
273
|
+
<block type="variables_set" inline="false">
|
274
|
+
<field name="VAR">回数</field>
|
275
|
+
<value name="VALUE">
|
276
|
+
<block type="operators_add" inline="true">
|
277
|
+
<value name="A">
|
278
|
+
<block type="variables_get">
|
279
|
+
<field name="VAR">回数</field>
|
280
|
+
</block>
|
281
|
+
</value>
|
282
|
+
<value name="B">
|
283
|
+
<block type="math_number">
|
284
|
+
<field name="NUM">1</field>
|
285
|
+
</block>
|
286
|
+
</value>
|
287
|
+
</block>
|
288
|
+
</value>
|
289
|
+
<next>
|
290
|
+
<block type="motion_turn_xy">
|
291
|
+
<field name="XY">x</field>
|
292
|
+
<next>
|
293
|
+
<block type="motion_set_x" inline="true">
|
294
|
+
<value name="X">
|
295
|
+
<block type="math_number">
|
296
|
+
<field name="NUM">510</field>
|
297
|
+
</block>
|
298
|
+
</value>
|
299
|
+
</block>
|
300
|
+
</next>
|
301
|
+
</block>
|
302
|
+
</next>
|
303
|
+
</block>
|
304
|
+
</statement>
|
305
|
+
</block>
|
306
|
+
</next>
|
307
|
+
</block>
|
308
|
+
</next>
|
309
|
+
</block>
|
310
|
+
</statement>
|
311
|
+
</block>
|
312
|
+
<block type="character_new" x="-15" y="271">
|
313
|
+
<field name="NAME">frog1</field>
|
314
|
+
<statement name="DO">
|
315
|
+
<block type="events_on_start">
|
316
|
+
<statement name="DO">
|
317
|
+
<block type="control_loop">
|
318
|
+
<statement name="DO">
|
319
|
+
<block type="control_if" inline="true">
|
320
|
+
<value name="COND">
|
321
|
+
<block type="operators_compare_eq" inline="true">
|
322
|
+
<value name="A">
|
323
|
+
<block type="variables_get">
|
324
|
+
<field name="VAR">プレイ中</field>
|
325
|
+
</block>
|
326
|
+
</value>
|
327
|
+
<value name="B">
|
328
|
+
<block type="operators_false"></block>
|
329
|
+
</value>
|
330
|
+
</block>
|
331
|
+
</value>
|
332
|
+
<statement name="THEN">
|
333
|
+
<block type="control_break"></block>
|
334
|
+
</statement>
|
335
|
+
<next>
|
336
|
+
<block type="control_if_else" inline="true">
|
337
|
+
<value name="COND">
|
338
|
+
<block type="operators_compare_gte" inline="true">
|
339
|
+
<value name="A">
|
340
|
+
<block type="sensing_character_property">
|
341
|
+
<field name="CHAR">frog1</field>
|
342
|
+
<field name="PROPERTY">y</field>
|
343
|
+
</block>
|
344
|
+
</value>
|
345
|
+
<value name="B">
|
346
|
+
<block type="sensing_character_property">
|
347
|
+
<field name="CHAR">ball1</field>
|
348
|
+
<field name="PROPERTY">y</field>
|
349
|
+
</block>
|
350
|
+
</value>
|
351
|
+
</block>
|
352
|
+
</value>
|
353
|
+
<statement name="THEN">
|
354
|
+
<block type="motion_change_y_by" inline="true">
|
355
|
+
<value name="Y">
|
356
|
+
<block type="math_number">
|
357
|
+
<field name="NUM">-15</field>
|
358
|
+
</block>
|
359
|
+
</value>
|
360
|
+
</block>
|
361
|
+
</statement>
|
362
|
+
<statement name="ELSE">
|
363
|
+
<block type="motion_change_y_by" inline="true">
|
364
|
+
<value name="Y">
|
365
|
+
<block type="math_number">
|
366
|
+
<field name="NUM">15</field>
|
367
|
+
</block>
|
368
|
+
</value>
|
369
|
+
</block>
|
370
|
+
</statement>
|
371
|
+
</block>
|
372
|
+
</next>
|
373
|
+
</block>
|
374
|
+
</statement>
|
375
|
+
</block>
|
376
|
+
</statement>
|
377
|
+
</block>
|
378
|
+
</statement>
|
379
|
+
</block>
|
380
380
|
</xml>
|