Skip to content

Commit

Permalink
entity.py is actually done now
Browse files Browse the repository at this point in the history
  • Loading branch information
lunathanael committed Mar 11, 2024
1 parent 5912e13 commit b9037ce
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions clash_royale/envs/game_engine/entities/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class Entity:
Created -> Loaded +> Started -> Running -> Stopped +> Unloaded
* Created - Entity is instantiated
* Loaded - Entity is loaded into a collection, relevant load code is ran
* Started - Entity is started, relevant start code is ran
* Loaded - Entity is loaded into a collection, load code is ran
* Started - Entity is started, start code is ran
* Running - Entity is running and working in some way
* Stopped - Entity is stopped, relevant stop code is ran and entity is no longer working with data
* Unloaded - Entity is unloaded, relevant unload code is ran
* Stopped - Entity is stopped, stop code is ran and entity is no longer working with data
* Unloaded - Entity is unloaded, unload code is ran
"""

CREATED: int = 0
Expand Down Expand Up @@ -458,7 +458,7 @@ def _load_entity(self, entity: Entity) -> None:
be worked with by end users!
:param entity: entity to add
:type mod: Entity
:type entity: Entity
"""

# Create the data to be stored:
Expand All @@ -471,7 +471,7 @@ def _load_entity(self, entity: Entity) -> None:

# Attach the collection to the entity:

mod.collection = self
entity.collection = self

def _unload_entity(self, entity: Entity):
"""
Expand All @@ -492,4 +492,3 @@ def _unload_entity(self, entity: Entity):
# Update our stats:

self.num_loaded -= 1

0 comments on commit b9037ce

Please sign in to comment.