From 3ee74cdb1b4fd2bf9eefdf6bcd8439b27cbb7336 Mon Sep 17 00:00:00 2001 From: cflip Date: Fri, 1 Apr 2022 21:23:01 -0600 Subject: Add a game timer This adds a delta time that ensures that everything moves at the same speed regardless of framerate or system. --- src/train.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/train.h') diff --git a/src/train.h b/src/train.h index c496db8..9e064df 100644 --- a/src/train.h +++ b/src/train.h @@ -10,7 +10,7 @@ public: explicit Train(Level& level) : m_level(level) { } - void update(); + void update(float deltaTime); void draw(Bitmap&, int, int); void setPosition(int x, int y); -- cgit v1.2.3