Sha256: 70f06a44532d1c93ea7ff3b8af2f23f11b3908d415fc419dd9633ab445bf7796

Contents?: true

Size: 479 Bytes

Versions: 46

Compression:

Stored size: 479 Bytes

Contents

# -*- coding: utf-8 -*-
require 'smalruby'

ryu1 = Character.new(x: 0, y: 0, costume: ['ryu1.png', 'ryu2.png'], angle: 0, rotation_style: :left_right)
taichi1 = Character.new(x: 0, y: 200, costume: ['taichi1.png', 'taichi2.png'], angle: 80, rotation_style: :left_right)

ryu1.on(:start) do
  loop do
    move(10)
    turn_if_reach_wall
    await
    next_costume
  end
end

taichi1.on(:start) do
  loop do
    move(15)
    turn_if_reach_wall
    await
    next_costume
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
smalruby-0.1.11-x86-mingw32 samples/costumes.rb
smalruby-0.1.11 samples/costumes.rb
smalruby-0.1.10-x86-mingw32 samples/costumes.rb
smalruby-0.1.10 samples/costumes.rb
smalruby-0.1.9-x86-mingw32 samples/costumes.rb
smalruby-0.1.9 samples/costumes.rb
smalruby-0.1.8-x86-mingw32 samples/costumes.rb
smalruby-0.1.8 samples/costumes.rb
smalruby-0.1.7-x86-mingw32 samples/costumes.rb
smalruby-0.1.7 samples/costumes.rb
smalruby-0.1.6-x86-mingw32 samples/costumes.rb
smalruby-0.1.6 samples/costumes.rb
smalruby-0.1.5-x86-mingw32 samples/costumes.rb
smalruby-0.1.5 samples/costumes.rb
smalruby-0.1.4-x86-mingw32 samples/costumes.rb
smalruby-0.1.4 samples/costumes.rb
smalruby-0.1.3-x86-mingw32 samples/costumes.rb
smalruby-0.1.3 samples/costumes.rb
smalruby-0.1.2-x86-mingw32 samples/costumes.rb
smalruby-0.1.2 samples/costumes.rb