Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

new elite intro state - ippa & deps g4m1ng!

  • Loading branch information...
commit eb70b8ff50cc44e756192ed11addf55bcdfb1d56 1 parent a11c822
@ippa ippa authored
View
2  Main.rb
@@ -39,8 +39,8 @@ def initialize(width = 800, height = 600, fullscreen = false, update_interval =
# Normal font used elsewhere
@font = Font.new($window, default_font_name, 30)
-
push_game_state( ScamState )
+ push_game_state( IntroState )
end
#
View
23 high_score_list.yml
@@ -0,0 +1,23 @@
+---
+- :name: IPP
+ :score: 2340
+- :name: CCC
+ :score: 2190
+- :name: FOO
+ :score: 1480
+- :name: BZR
+ :score: 500
+- :name: BZR
+ :score: 450
+- :name: BZR
+ :score: 400
+- :name: BZR
+ :score: 350
+- :name: BZR
+ :score: 300
+- :name: BZR
+ :score: 250
+- :name: BZR
+ :score: 200
+- :name: BZR
+ :score: 150
View
BIN  media/game_over.ttf
Binary file not shown
View
BIN  media/gradient.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  media/intro.ogg
Binary file not shown
View
BIN  media/intro_1.wav
Binary file not shown
View
BIN  media/intro_2.wav
Binary file not shown
View
BIN  media/intro_3.wav
Binary file not shown
View
BIN  media/skull.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
39 models/intro_state.rb
@@ -0,0 +1,39 @@
+class IntroState < Chingu::GameState
+ #has_trait :timer, :effect
+ def initialize(options = {})
+ super
+ self.input = { :space => :pop_game_state, :esc => :pop_game_state }
+ @skull = GameObject.create(:image => "skull.png", :rotation_center => :top_left, :color => 0x00FFFFFF, :zorder => 2)
+ @gradient = GameObject.create(:image => "gradient.png", :rotation_center => :top_left, :color => 0x00FFFFFF, :zorder => 1)
+
+ # remove when new chingu comes out
+ @skull.rotation_center(:top_left)
+ @gradient.rotation_center(:top_left)
+
+ @sweep = Song["intro.ogg"]
+ @sweep.play
+
+ Text.size = 120
+ Text.font = "media/game_over.ttf"
+ @drop_text = Array.new
+ @drop_text << Text.create("IPPA", :y => -600*4, :color => 0xFFFF0000, :stop_at => 100, :sound => "intro_1.wav", :falling => true)
+ @drop_text << Text.create("& DEPS", :y => -700*4, :color => 0xFF00FF00, :stop_at => 200, :sound => "intro_2.wav", :falling => true)
+ @drop_text << Text.create("GAMING", :y => -800*4, :color => 0xFF0000FF, :stop_at => 300, :sound => "intro_3.wav", :falling => true)
+ end
+
+ def update
+ @skull.alpha += 1
+ @gradient.alpha += 1
+
+ @drop_text.select { |text| text.options[:falling] }.each do |text|
+ if text.y > text.options[:stop_at]
+ Sound[text.options[:sound]].play(0.4)
+ text.options[:falling] = false
+ @sweep.stop if @sweep
+ else
+ text.y += 10
+ end
+ end
+ end
+
+end
Please sign in to comment.
Something went wrong with that request. Please try again.