Reduce max visual width of food from 10 to 8 and adjust rendering size calculation for improved visual consistency
Some checks failed
Build Simulation and Test / Run All Tests (push) Failing after 31s
Some checks failed
Build Simulation and Test / Run All Tests (push) Failing after 31s
This commit is contained in:
parent
3253bebe9c
commit
7dde7b3e1f
@ -88,7 +88,7 @@ class FoodObject(BaseEntity):
|
|||||||
:param position: The position of the food.
|
:param position: The position of the food.
|
||||||
"""
|
"""
|
||||||
super().__init__(position, Rotation(angle=0))
|
super().__init__(position, Rotation(angle=0))
|
||||||
self.max_visual_width: int = 10
|
self.max_visual_width: int = 8
|
||||||
self.decay: int = 0
|
self.decay: int = 0
|
||||||
self.decay_rate: int = 1
|
self.decay_rate: int = 1
|
||||||
self.max_decay = 200
|
self.max_decay = 200
|
||||||
@ -156,7 +156,7 @@ class FoodObject(BaseEntity):
|
|||||||
screen,
|
screen,
|
||||||
(255 - self.normalize_decay_to_color(), 0, 0),
|
(255 - self.normalize_decay_to_color(), 0, 0),
|
||||||
camera.world_to_screen(*self.position.get_position()),
|
camera.world_to_screen(*self.position.get_position()),
|
||||||
int(3 * camera.zoom)
|
int((self.max_visual_width // 2) * camera.zoom)
|
||||||
)
|
)
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user