-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWithered.cpp
More file actions
38 lines (30 loc) · 955 Bytes
/
Withered.cpp
File metadata and controls
38 lines (30 loc) · 955 Bytes
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
#include "Withered.h"
#include "Plant.h"
#include <iostream>
std::string Withered::getStateName() const { return "Withered"; }
void Withered::onEnter(Plant* plant)
{
std::cout << "[Withered] onEnter: " << plant->getName() << " (dead/removed)\n";
}
void Withered::onExit(Plant* plant)
{
std::cout << "[Withered] onExit: " << plant->getName() << std::endl;
}
void Withered::dailyTick(Plant* /*plant*/) {}
void Withered::water(Plant* /*plant*/)
{
std::cout << "[Withered] water has no effect (by default)" << std::endl;
// If you want revival, you could transition to new Seedling/Growing here.
}
void Withered::fertilize(Plant* /*plant*/)
{
std::cout << "[Withered] fertilizer has no effect" << std::endl;
}
void Withered::harvestAndStore(Plant* /*plant*/)
{
std::cout << "[Withered] harvest ignored " << std::endl;
}
void Withered::discard(Plant* /*plant*/)
{
std::cout << "[Withered] already discarded" << std::endl;
}