Sha256: 9d377a6513e7941779201f764f53dda254d2c0ec7b4725c376032dfa71454328
Contents?: true
Size: 560 Bytes
Versions: 44
Compression:
Stored size: 560 Bytes
Contents
# -*- coding: utf-8 -*- require 'smalruby' car1 = Character.new(x: 0, y: 0, costume: 'car1.png', rotation_style: :left_right) car1.on(:start) do loop do if enable_pen say(message: 'ペンを下げる') else say(message: 'ペンを上げる') end end end car1.on(:click) do if enable_pen up_pen else down_pen end end car1.on(:key_down, K_LEFT) do self.x -= 10 end car1.on(:key_down, K_RIGHT) do self.x += 10 end car1.on(:key_down, K_UP) do self.y -= 10 end car1.on(:key_down, K_DOWN) do self.y += 10 end
Version data entries
44 entries across 44 versions & 1 rubygems