Added new monster sprites.

This commit is contained in:
Cameron Smart
2020-04-19 00:14:21 -07:00
parent 46c9270c19
commit b4fb33f369
12 changed files with 24 additions and 5 deletions

View File

@@ -49,7 +49,7 @@ class Game(arcade.Window):
self.enemy_list = arcade.SpriteList()
# Set up the player, specifically placing it at these coordinates.
image_source = "resources/images/monsters/skeleton.png"
image_source = "resources/images/monsters/skeleton/skeleton2.png"
self.player_sprite = arcade.Sprite(image_source, Config.CHARACTER_SCALING)
self.player_sprite.center_x = Config.SCREEN_WIDTH / 2
self.player_sprite.center_y = Config.SCREEN_HEIGHT / 2
@@ -57,11 +57,11 @@ class Game(arcade.Window):
self.player_list.append(self.player_sprite)
# Create the level
self.floor_list, self.wall_list = Level.load_file('resources/levels/box.json')
self.floor_list, self.wall_list = Level.load_file('resources/levels/test1.json')
# Create monsters
self.enemy_list.append(Enemy(image_source, 100, 100).get_enemy())
self.enemy_list.append(Enemy(image_source, Config.SCREEN_WIDTH / 2 + 10, Config.SCREEN_HEIGHT / 2 + 10).get_enemy())
self.enemy_list.append(Enemy("resources/images/monsters/ghost/ghost1.png", 200, 200).get_enemy())
self.enemy_list.append(Enemy("resources/images/monsters/frog/frog1.png", 200, 1000).get_enemy())
# Create the 'physics engine'
self.physics_engine = arcade.PhysicsEngineSimple(self.player_sprite, self.wall_list)
@@ -71,7 +71,7 @@ class Game(arcade.Window):
# Clear the screen to the background color
arcade.start_render()
# Draw our sprites
self.floor_list.draw()
self.player_list.draw()

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

View File

@@ -0,0 +1,19 @@
{
"elements" : {
"w" : "resources/images/tiles/wall_tile.png",
" " : "resources/images/tiles/floor_tile.png",
"e" : ""
},
"structure" : [
["w", "w", "w", "w", "w", "w", "w", "w", "w", "w"],
["w", " ", " ", "w", " ", " ", "w", " ", " ", "w"],
["w", " ", " ", "w", " ", " ", "w", " ", " ", "w"],
["w", " ", " ", "w", " ", " ", "w", " ", " ", "w"],
["w", " ", " ", " ", " ", " ", " ", " ", " ", "w"],
["w", " ", " ", " ", " ", " ", " ", " ", " ", "w"],
["w", " ", " ", "w", " ", " ", "w", " ", " ", "w"],
["w", " ", " ", "w", " ", " ", "w", " ", " ", "w"],
["w", " ", " ", "w", " ", " ", "w", " ", " ", "w"],
["w", "w", "w", "w", "w", "w", "w", "w", "w", "w"]
]
}