Implemented struct growing_plant

This commit is contained in:
CobaltXII
2019-01-04 16:04:00 -05:00
parent da188d33e2
commit f8490d5873

View File

@@ -13,3 +13,49 @@ enum growing_plant_type
// A growing plant.
struct growing_plant
{
// The position of the growing plant.
unsigned int x;
unsigned int y;
unsigned int z;
// The growing_plant_type of this growing_plant.
growing_plant_type type;
// The amount of ticks until the plant grows into it's next form. This
// value is decremented by 1 every tick. If it is equal to 0, the plant
// grows into it's next form (if any). The timer is then set to the amount
// of ticks until the plant grows into it's following form.
unsigned int timer;
// A growing plant is marked as done when it has reached it's final form
// or phase.
bool done;
growing_plant
(
unsigned int _x,
unsigned int _y,
unsigned int _z,
growing_plant_type _type,
unsigned int _timer
)
{
x = _x;
y = _y;
z = _z;
type = _type;
timer = _timer;
done = false;
}
};