ScavTrap guard
This commit is contained in:
@@ -68,6 +68,17 @@ void ScavTrap::attack(const std::string &target)
|
||||
|
||||
void ScavTrap::guardGate()
|
||||
{
|
||||
std::cout << "ScavTrap " << this->name << " is in Gate keeper mode"
|
||||
if (this->guardGate)
|
||||
{
|
||||
this->guardGate = false;
|
||||
std::cout << "ScavTrap " << this->name << " is not in Gate keeper mode"
|
||||
<< std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->guardGate = true;
|
||||
std::cout << "ScavTrap " << this->name << " is in Gate keeper mode"
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
class ScavTrap : public ClapTrap
|
||||
{
|
||||
private:
|
||||
boold guarding_gate;
|
||||
public:
|
||||
ScavTrap();
|
||||
ScavTrap(std::string name);
|
||||
|
||||
Reference in New Issue
Block a user