Skip to content

Commit

Permalink
Add Thin
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Apr 27, 2009
1 parent 9348c81 commit 4cb662d
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 2 deletions.
20 changes: 18 additions & 2 deletions ai_player.rb
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def initialize(window, map, x, y, death_sound = 'balloon.mp3', firing_sound = 'f
}

super(window, sprites, map, x, y, death_sound, firing_sound, kill_score, step_size, animation_interval)
@health = 200
@health = 250
end
end

Expand All @@ -438,6 +438,22 @@ def initialize(window, map, x, y, death_sound = 'mein_spagetthicode.wav', firing
end
end

class Thin < Enemy
def initialize(window, map, x, y, death_sound = 'mein_spagetthicode.wav', firing_sound = 'meine_sql.wav', kill_score = 500, step_size = 3, animation_interval = 0.5)
sprites = {
:idle => ['thin.png'],
:walking => ['thin.png', 'thin2.png'],
:firing => ['thin_attacking.png', 'thin_attacking2.png'],
:damaged => ['thin_damaged.png'],
:dead => ['thin_dead.png', 'thin_dead2.png', 'thin_dead3.png', 'thin_dead4.png']
}

super(window, sprites, map, x, y, death_sound, firing_sound, kill_score, step_size, animation_interval)
@health = 130
@min_distance = 1
end
end

class Dog < MeleeEnemy
def initialize(window, map, x, y, death_sound = 'dog_cry.mp3', firing_sound = 'dog_bark.mp3', kill_score = 500, step_size = 7, animation_interval = 0.2)
sprites = {
Expand All @@ -450,6 +466,6 @@ def initialize(window, map, x, y, death_sound = 'dog_cry.mp3', firing_sound = 'd

super(window, sprites, map, x, y, death_sound, firing_sound, kill_score, step_size, animation_interval)
@health = 100
@min_distance = 0
@min_distance = 1
end
end
1 change: 1 addition & 0 deletions level.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def self.create(window)
map.players = [
Guard.new(window, map, 40.5 * Map::GRID_WIDTH_HEIGHT, 61.5 * Map::GRID_WIDTH_HEIGHT),
Dog.new(window, map, 37.5 * Map::GRID_WIDTH_HEIGHT, 57.5 * Map::GRID_WIDTH_HEIGHT),
Thin.new(window, map, 34.5 * Map::GRID_WIDTH_HEIGHT, 45.5 * Map::GRID_WIDTH_HEIGHT),

Hans.new(window, map, 31.0 * Map::GRID_WIDTH_HEIGHT, 35.0 * Map::GRID_WIDTH_HEIGHT),
Hans.new(window, map, 38.0 * Map::GRID_WIDTH_HEIGHT, 31.0 * Map::GRID_WIDTH_HEIGHT),
Expand Down
Binary file added thin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified thin.psd
Binary file not shown.
Binary file added thin2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified thin2.psd
Binary file not shown.
Binary file added thin_attacking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added thin_attacking2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added thin_damaged.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added thin_damaged.psd
Binary file not shown.
Binary file added thin_dead.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added thin_dead.psd
Binary file not shown.
Binary file added thin_dead2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added thin_dead2.psd
Binary file not shown.
Binary file added thin_dead3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added thin_dead3.psd
Binary file not shown.
Binary file added thin_dead4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added thin_dead4.psd
Binary file not shown.

0 comments on commit 4cb662d

Please sign in to comment.