1 hour ago · 6 min read1169 words · Tech · hide · 0 comments

Hello, loves! OK, let’s learn how to do the thing we already did. I plan to go in Very Small Steps. The morning’s spike pays off, it seems to me. I think we’ll start this time by trying to add a single sprite to the content sprite list, on command. Why? Because last time, adding a new sprite seemed not to work. So this time, we’ll focus there first. We’ll do it on the K keystroke, as before. Just a lot less ambitiously. class DungeonView: ... elif symbol == arcade.key.K: self.display_path() ... def display_path(self): my_resources = '/Users/ron/Desktop/DungeonTiles/png/objects/' item = ContentFactory().decor(name="skel", resource=my_resources + 'Skeleton1.png', scale=0.5) cell = Cell(31, 28) self.make_view_and_sprite(cell, item) Where did I get this new make_view_and_sprite method? I extracted it from the working method create_content_lists: class DungeonView: def create_content_lists(self): for room in self.dungeon.rooms: self.content_views_by_room[room] = [] self.content_views =…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.