3.3P.rtf - require'rubygems require'gosu require\\circle module ZOrder BACKGROUND MIDDLE TOP =*0.2 end class DemoWindow< Gosu:Window def initialize

3.3P.rtf - require'rubygems require'gosu requirecircle...

This preview shows page 1 - 3 out of 3 pages.

require 'rubygems' require 'gosu' require '.\circle' module ZOrder BACKGROUND, MIDDLE, TOP = *0..2 end class DemoWindow< Gosu::Window def initialize super(1000,800,false) self.caption="Gosu Demo Window" end def draw #draw_triangle(x+size,y+size,0xff00ffff,x-size,y-size,0xff00ffff,x+size,y-size,0xff00ffff) #draw_triangle(x+size,y+size,0xff00ffff,x-size,y-size,0xff00ffff,x+size,y-size,0xff00ffff) img2 = Gosu::Image.new(Circle.new(75)) img2.draw(646, 398, ZOrder::TOP, 1.04, 1.0, Gosu::Color::FUCHSIA) img2.draw(798, 398, ZOrder::TOP, 1.04, 1.0, Gosu::Color::FUCHSIA) Gosu.draw_rect(785, 460, 60, 150, Gosu::Color::FUCHSIA, ZOrder::TOP, mode=:default) draw_triangle(650,500,Gosu::Color::FUCHSIA,800,725,Gosu::Color::BLUE,950,500,Gosu::Color::F UCHSIA,ZOrder::TOP,mode=:default) img3 = Gosu::Image.new(Circle.new(43)) img3.draw(18, 132, ZOrder::TOP, 1.04, 1.0, Gosu::Color::RED)
img3.draw(93, 132, ZOrder::TOP, 1.04, 1.0, Gosu::Color::RED) Gosu.draw_rect(80, 180, 60, 40, Gosu::Color::RED, ZOrder::TOP, mode=:default) draw_triangle(25,200,Gosu::Color::RED,100,350,Gosu::Color::YELLOW,175,200,Gosu::Color::RED, ZOrder::TOP,mode=:default) Gosu.draw_quad(500, 250,Gosu::Color::FUCHSIA, 800, 250,Gosu::Color::AQUA, 950,

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture