Skip to main content
8 events
when toggle format what by license comment
Jun 25, 2012 at 21:25 comment added Dave Voyles You were correct. I was using MoveSpeed and speed for some reason. Not sure why I had two separate floats in there. I was briefly working on this with someone else at one point when they added the powerups and I guess that's why there are two variables for speed. The fix was EXTREMELY easy. I simply made "speed" my speed for the ball. I created a public void SlowMoSpeed() { speed = 2f; } and placed that inside Update. When I press Z, the ball comes to a crawl. It was the speed vs MoveSpeed that threw me off. Thanks guys!
Jun 25, 2012 at 21:23 vote accept Dave Voyles
Jun 27, 2012 at 21:58
Jun 25, 2012 at 17:56 history edited Blau CC BY-SA 3.0
added 1588 characters in body
Jun 25, 2012 at 16:47 comment added Dave Voyles I'll have to look further into how to do that. As it stands, I'm trying to pass in GameTime for the ball's update method, but am not seeing any results. I'm doing this very similar to what I did for the bats, which work fine however. I can't write code here, so I'll list it above.
Jun 25, 2012 at 6:39 history edited Blau CC BY-SA 3.0
added 376 characters in body
Jun 25, 2012 at 6:32 comment added Blau I prefer to pass it as a function argument, it will do things easier... you can call UpdatePosition with a reduction factor only for the ball... like ball.UpdatePosition(ElapsedSeconds*0.5f), and then only that ball is affected by the speed reduction
Jun 25, 2012 at 1:13 comment added Dave Voyles Hmmmm I think I'm getting there. So declare ElapsedTime as "public float ElapsedTime();" in my GameplayScreen class, an then my MoveDown() method should actually read: "SetPosition(Position + new Vector2(0, moveSPeed * GameplayScreen.Instance.ElapsedTime));" Is that correct?
Jun 24, 2012 at 21:16 history answered Blau CC BY-SA 3.0