mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
just use equals like before
This commit is contained in:
parent
f67ffac227
commit
3f9fdd7c37
|
@ -600,7 +600,7 @@ impl<'a> Player<'a> {
|
||||||
AttackTimer::Attack(a) => {
|
AttackTimer::Attack(a) => {
|
||||||
*a -= 1;
|
*a -= 1;
|
||||||
let frame = self.sword.attack_frame(*a);
|
let frame = self.sword.attack_frame(*a);
|
||||||
self.fudge_factor.x += self.sword.fudge(frame) * self.facing as i32;
|
self.fudge_factor.x = (self.sword.fudge(frame) * self.facing as i32).into();
|
||||||
let tag = self.sword.attack_tag();
|
let tag = self.sword.attack_tag();
|
||||||
let sprite = controller.sprite(tag.animation_sprite(frame as usize));
|
let sprite = controller.sprite(tag.animation_sprite(frame as usize));
|
||||||
self.entity.sprite.set_sprite(sprite);
|
self.entity.sprite.set_sprite(sprite);
|
||||||
|
@ -614,7 +614,7 @@ impl<'a> Player<'a> {
|
||||||
AttackTimer::Cooldown(a) => {
|
AttackTimer::Cooldown(a) => {
|
||||||
*a -= 1;
|
*a -= 1;
|
||||||
let frame = self.sword.hold_frame();
|
let frame = self.sword.hold_frame();
|
||||||
self.fudge_factor.x += self.sword.fudge(frame) * self.facing as i32;
|
self.fudge_factor.x = (self.sword.fudge(frame) * self.facing as i32).into();
|
||||||
let tag = self.sword.attack_tag();
|
let tag = self.sword.attack_tag();
|
||||||
let sprite = controller.sprite(tag.animation_sprite(frame as usize));
|
let sprite = controller.sprite(tag.animation_sprite(frame as usize));
|
||||||
self.entity.sprite.set_sprite(sprite);
|
self.entity.sprite.set_sprite(sprite);
|
||||||
|
|
Loading…
Reference in a new issue