-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdefense.php
56 lines (43 loc) · 1.83 KB
/
defense.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
declare(strict_types = 1);
defined('INSIDE') OR exit('No direct script access allowed');
class U_Defense extends U_Unit {
/** @var int The current amount */
private $amount;
/**
* Unit constructor.
* @param int $uID the internal unit-id
* @param int $uAmount the current amount of the unit
* @param float $uCostMetal the metal-cost for one unit/first level
* @param float $uCostCrystal the crystal-cost for one unit/first level
* @param float $uCostDeuterium the deuterium-cost for one unit/first level
* @param float $uCostEnergy the energy-cost for one unit/first level
* @param float $uCostFactor the factor, at which the price is rising at each level
*/
public function __construct(int $uID, int $uAmount, float $uCostMetal, float $uCostCrystal,
float $uCostDeuterium, float $uCostEnergy,
$uCostFactor) {
//TODO: check if 300 < unitID < 400
parent::__construct($uID, $uCostMetal, $uCostCrystal, $uCostDeuterium, $uCostEnergy, $uCostFactor);
$this->amount = $uAmount;
}
public function getCostMetal() : float {
// TODO: Implement getCostMetal() method.
return 0.0;
}
public function getCostCrystal() : float {
// TODO: Implement getCostCrystal() method.
return 0.0;
}
public function getCostDeuterium() : float {
// TODO: Implement getCostDeuterium() method.
return 0.0;
}
public function getCostEnergy() : float {
// TODO: Implement getCostEnergy() method.
return 0.0;
}
public function getAmount() : int {
return $this->amount;
}
}