Permalink
Browse files

Upgrade movement change.

Gave the movement for upgrade objects a nice effect. I like it and it's
nice. If you want to see something cool, move that change  -
2*Math.sin(pos.x*Math.PI/180) to the x component on bullets when they're
updated. Super cool effects....could do something with that later.
  • Loading branch information...
1 parent 97aba89 commit 16aa24dcb93cf973dc0ee4e5292e09a57760d1af @SubSage committed Apr 4, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 GDCalaga/src/org/gdc/gdcalaga/Upgrade.java
@@ -71,7 +71,7 @@ public Upgrade(EntityManager manager, Vector2f initPos, Upgrade.UpgradeType type
public void update(float delta)
{
//TODO Temporary right to left linear movement, perhaps sinusoidal movement?
- this.pos.x += vel.x * delta / 1000;
+ this.pos.x += vel.x * delta / 1000 - 2*Math.sin(pos.x*Math.PI/180);
RectShape rect = (RectShape)shape;
rect.pos.set(this.pos);

0 comments on commit 16aa24d

Please sign in to comment.