Skip to content

Commit 76add53

Browse files
authored
Remove resource list (#2209)
* Delete util/make_resources_init.py * Replace resources in sprite_health * Remove resource list in arcade.resources * Delete tests/unit/resources/test_resources.pp * Fix create_resources_listing * Update query_demo
1 parent 49847c9 commit 76add53

6 files changed

Lines changed: 20 additions & 909 deletions

File tree

arcade/examples/sprite_health.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@
1010
from typing import Tuple
1111

1212
import arcade
13-
from arcade.resources import (
14-
image_female_person_idle,
15-
image_laser_blue01,
16-
image_zombie_idle,
17-
)
1813
from arcade.types import Color
1914

15+
IMAGE_FEMALE_PERSON_IDLE = ":assets:images/animated_characters/female_person/femalePerson_idle.png"
16+
IMAGE_LASER_BLUE01 = ":assets:images/space_shooter/laserBlue01.png"
17+
IMAGE_ZOMBIE_IDLE = ":assets:images/animated_characters/zombie/zombie_idle.png"
18+
2019
SPRITE_SCALING_PLAYER = 0.5
2120
SPRITE_SCALING_ENEMY = 0.5
2221
SPRITE_SCALING_BULLET = 1
@@ -48,7 +47,7 @@ def sprite_off_screen(
4847
class Player(arcade.Sprite):
4948
def __init__(self, bar_list: arcade.SpriteList) -> None:
5049
super().__init__(
51-
image_female_person_idle,
50+
IMAGE_FEMALE_PERSON_IDLE,
5251
scale=SPRITE_SCALING_PLAYER,
5352
)
5453
self.indicator_bar: IndicatorBar = IndicatorBar(
@@ -60,7 +59,7 @@ def __init__(self, bar_list: arcade.SpriteList) -> None:
6059
class Bullet(arcade.Sprite):
6160
def __init__(self) -> None:
6261
super().__init__(
63-
image_laser_blue01,
62+
IMAGE_LASER_BLUE01,
6463
scale=SPRITE_SCALING_BULLET,
6564
)
6665

@@ -256,7 +255,7 @@ def __init__(self) -> None:
256255
self.player_sprite_list.append(self.player_sprite)
257256

258257
# Create enemy Sprite
259-
self.enemy_sprite = arcade.Sprite(image_zombie_idle, scale=SPRITE_SCALING_ENEMY)
258+
self.enemy_sprite = arcade.Sprite(IMAGE_ZOMBIE_IDLE, scale=SPRITE_SCALING_ENEMY)
260259
self.enemy_sprite_list.append(self.enemy_sprite)
261260

262261
# Create text objects

arcade/experimental/query_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self, width, height, title):
2323
num_sprites = 100_000
2424
sprite_scale = 0.02 # All sprites covering the screen
2525
# sprite_scale = 1.0 # default
26-
self.texture = arcade.load_texture(arcade.resources.image_box_crate)
26+
self.texture = arcade.load_texture(":assets:images/tiles/boxCrate.png")
2727

2828
r = int(math.sqrt(num_sprites))
2929
for y in range(r):

0 commit comments

Comments
 (0)