Skip to content

Commit

Permalink
Update to remove magic number
Browse files Browse the repository at this point in the history
  • Loading branch information
zheng-ze committed Apr 20, 2024
1 parent 21d3daf commit 2fc2405
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class SoldierUnit: BaseUnit, PlayerSpawnable {
self.addComponent(ShootingComponent(fireRate: SoldierUnit.attackRate,
range: SoldierUnit.range,
attackPower: SoldierUnit.attackPower, shootingType: Bullet.self))
self.addComponent(DamageComponent(attackRate: 1,
attackPower: 1,
self.addComponent(DamageComponent(attackRate: .unit,
attackPower: .unit,
temporary: false))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class WizardUnit: BaseUnit, PlayerSpawnable {
self.addComponent(ShootingComponent(fireRate: WizardUnit.attackRate,
range: WizardUnit.range,
attackPower: WizardUnit.attackPower, shootingType: WizardBall.self))
self.addComponent(DamageComponent(attackRate: 1,
attackPower: 1,
self.addComponent(DamageComponent(attackRate: .unit,
attackPower: .unit,
temporary: false))
}

Expand Down

0 comments on commit 2fc2405

Please sign in to comment.