Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Objects list : How to use it?
#16
actorsand world.objects are standard Python lists. They have the remove() method to remove items. That's why you can't find their definitions.

Python list reference:
https://docs.python.org/3/tutorial/datastructures.html
  • Actor is the base class for any game entity (everything that lives is an Actor)
  • actors is the active actors list populated with Actor instances
  • world.objects is the object list loaded from the .tmx file (object layer)
ElementTree is part of Python standard library for loading XML files:
https://docs.python.org/3/library/xml.et...ttree.html

When I made this sample project, Tilengine couldn't yet load object layers from .tmx files, so I used Python xml facility to do it. Now it can load TLN_ObjectList by itself, you don't need to load it separately anymore.
Reply


Messages In This Thread
Objects list : How to use it? - by System64 - 12-19-2020, 05:20 AM
RE: Objects list : How to use it? - by megamarc - 12-19-2020, 06:09 PM
RE: Objects list : How to use it? - by System64 - 12-19-2020, 09:57 PM
RE: Objects list : How to use it? - by megamarc - 12-19-2020, 10:27 PM
RE: Objects list : How to use it? - by System64 - 12-19-2020, 11:29 PM
RE: Objects list : How to use it? - by megamarc - 12-19-2020, 11:59 PM
RE: Objects list : How to use it? - by System64 - 12-20-2020, 12:07 AM
RE: Objects list : How to use it? - by megamarc - 12-20-2020, 12:15 AM
RE: Objects list : How to use it? - by System64 - 12-20-2020, 02:58 AM
RE: Objects list : How to use it? - by megamarc - 12-20-2020, 03:14 AM
RE: Objects list : How to use it? - by System64 - 12-20-2020, 04:14 AM
RE: Objects list : How to use it? - by megamarc - 12-20-2020, 08:05 AM
RE: Objects list : How to use it? - by System64 - 12-20-2020, 09:25 AM
RE: Objects list : How to use it? - by megamarc - 12-20-2020, 05:17 PM
RE: Objects list : How to use it? - by System64 - 12-20-2020, 10:06 PM
RE: Objects list : How to use it? - by megamarc - 12-21-2020, 03:14 AM
RE: Objects list : How to use it? - by System64 - 12-21-2020, 04:13 AM
RE: Objects list : How to use it? - by megamarc - 12-21-2020, 07:41 AM
RE: Objects list : How to use it? - by System64 - 12-21-2020, 07:53 AM
RE: Objects list : How to use it? - by megamarc - 12-21-2020, 08:23 AM
RE: Objects list : How to use it? - by System64 - 12-21-2020, 09:15 AM
RE: Objects list : How to use it? - by megamarc - 12-24-2020, 06:47 AM
RE: Objects list : How to use it? - by System64 - 12-24-2020, 06:56 AM
RE: Objects list : How to use it? - by megamarc - 12-24-2020, 04:33 PM
RE: Objects list : How to use it? - by System64 - 12-24-2020, 09:43 PM
RE: Objects list : How to use it? - by megamarc - 12-25-2020, 07:31 AM
RE: Objects list : How to use it? - by System64 - 12-25-2020, 08:59 AM
RE: Objects list : How to use it? - by megamarc - 12-27-2020, 05:05 PM
RE: Objects list : How to use it? - by System64 - 12-27-2020, 09:44 PM
RE: Objects list : How to use it? - by megamarc - 12-28-2020, 05:58 PM
RE: Objects list : How to use it? - by System64 - 12-28-2020, 09:13 PM
RE: Objects list : How to use it? - by megamarc - 12-28-2020, 10:42 PM
RE: Objects list : How to use it? - by System64 - 12-29-2020, 01:31 AM
RE: Objects list : How to use it? - by megamarc - 12-31-2020, 10:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)