Gameplay de la recherche dans les dossiers #44

Merged
CoCo_Sol merged 32 commits from directory-search into main 2023-10-30 00:49:00 +00:00
Showing only changes of commit d544c5a57d - Show all commits

View file

@ -2,7 +2,6 @@
Un plugin permettant de faire des déplacements fluides des entités. Un plugin permettant de faire des déplacements fluides des entités.
""" """
import math
from engine import Delta, Position, Scene, Vec2, World from engine import Delta, Position, Scene, Vec2, World
@ -25,9 +24,10 @@ def __update_positions(world: World):
for entity in world.query(Position, Target): for entity in world.query(Position, Target):
position = entity[Position] position = entity[Position]
target = entity[Target] target = entity[Target]
speed = entity[Speed] if Speed in entity else Speed(500) speed = entity[Speed] if Speed in entity else Speed(5)
blend = math.pow(0.5, world[Delta] * speed) entity[Position] = Position(
entity[Position] = Position(position + ((target - position) * blend)) position + (target - position) * world[Delta] * speed
)
PLUGIN = Scene( PLUGIN = Scene(