mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 15:42:35 +00:00
Removed global state for LightManager and ObjectManager, they're now inside GameState. Simplified terrain mesh.
This commit is contained in:
@@ -3,8 +3,8 @@ class IMICFPS
|
||||
def setup
|
||||
@header = Text.new("I-MIC FPS", y: 10, size: 100, alignment: :center)
|
||||
@subheading = Text.new("Loading Assets", y: 100, size: 50, alignment: :center)
|
||||
@state = Text.new("Preparing...", y: $window.height/2-40, size: 40, alignment: :center)
|
||||
@percentage = Text.new("0%", y: $window.height-50-25, size: 50, alignment: :center)
|
||||
@state = Text.new("Preparing...", y: window.height/2-40, size: 40, alignment: :center)
|
||||
@percentage = Text.new("0%", y: window.height-50-25, size: 50, alignment: :center)
|
||||
|
||||
@dummy_game_object = nil
|
||||
@assets = []
|
||||
@@ -15,7 +15,7 @@ class IMICFPS
|
||||
add_asset(:obj, "objects/biped.obj")
|
||||
|
||||
# Currently broken
|
||||
Shader.new(name: "lighting", vertex_file: "shaders/vertex/lighting.glsl", fragment_file: "shaders/fragment/lighting.glsl")
|
||||
# Shader.new(name: "lighting", vertex_file: "shaders/vertex/lighting.glsl", fragment_file: "shaders/fragment/lighting.glsl")
|
||||
|
||||
@act = false
|
||||
@cycled = false
|
||||
@@ -29,7 +29,15 @@ class IMICFPS
|
||||
@subheading.draw
|
||||
@state.draw
|
||||
|
||||
fill(Gosu::Color.rgba(127, 64, 0, 150))
|
||||
# fill()
|
||||
color = Gosu::Color.rgb(255, 127, 0)
|
||||
color_two = Gosu::Color.rgb(200, 100, 0)
|
||||
Gosu.draw_quad(
|
||||
0, 0, color,
|
||||
window.width, 0, color_two,
|
||||
0, window.height, color,
|
||||
window.width, window.height, color_two
|
||||
)
|
||||
progressbar
|
||||
end
|
||||
|
||||
@@ -58,7 +66,7 @@ class IMICFPS
|
||||
end
|
||||
else
|
||||
@state.text = "Loading #{@assets[@asset_index][:path].split('/').last}..."
|
||||
@state.x = ($window.width/2)-(@state.width/2)
|
||||
@state.x = (window.width/2)-(@state.width/2)
|
||||
@cycled = true
|
||||
end
|
||||
end
|
||||
@@ -69,8 +77,8 @@ class IMICFPS
|
||||
|
||||
def progressbar
|
||||
@percentage.draw
|
||||
progress = (@asset_index.to_f/@assets.count)*$window.width
|
||||
draw_rect(0, $window.height-100, progress, 100, Gosu::Color.rgb(255,127,0))
|
||||
progress = (@asset_index.to_f/@assets.count)*window.width
|
||||
draw_rect(0, window.height-100, progress, 100, Gosu::Color.rgb(255,127,0))
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user