DemoProductions / fighter

2 stars 1 forks source link

Knockback determined by attack #14

Closed flip40 closed 8 years ago

flip40 commented 8 years ago

Currently knockback is controlled by the player itself (i.e. if player1 got hit, player1 says it got hit so go back at 1/-1 velocity while animation plays).

Instead, we should have a new public Vector2D knockbackVector that will be assigned by attacks (such as in Sanji.kick()) to determine the proper knockback vector. Where the player currently says "vector x 1 or -1" should then be changed to simply vector based on the knockback vector variable.