WorldSim  inDev
2D tile-based sandbox RPG with procedurally generated fantasy world simulator 🌏
WorldObject_Tree.hpp
Go to the documentation of this file.
1 #pragma once
2 #ifndef WORLDSIM_WORLDOBJECT_TREE_HPP
3 #define WORLDSIM_WORLDOBJECT_TREE_HPP
4 
5 /* WorldObject.hpp
6  #include"WorldObject_Tree.hpp"
7 
8  Trees can be harvested for wood. They are also an obstacle for movement and LOS.
9 
10  Tree can provide resource on destruction.
11  Tree can also be container for Items/Ingredients.
12 */
13 
14 //Static
15 // Doesn't need to track coordinates because it can't move on its own.
16 // 1 static per tile
17 // Statics only tick once per day
18 // Example statics:
19  // Tree
20  // Plant
21  // Construction (wall and/or floor)
22  // Furniture
23 // Statics may block movement and/or LOS
24 
25 // Tree should be a type of static.
27 {
28  public:
29 
30  // Determines the stage of growth the tree is at: Sapling, young tree, tree.
31  int growth;
32 
33  WorldObject_Tree(int _growth = 0);
34  virtual ~WorldObject_Tree() {}
35 
36 
37  virtual std::string getName();
38 
39  virtual Texture* currentTexture();
40 };
41 
42 #endif
Definition: WorldObject.hpp:18
int growth
Definition: WorldObject_Tree.hpp:31
virtual Texture * currentTexture()
Definition: WorldObject_Tree.cpp:45
virtual std::string getName()
Definition: WorldObject_Tree.cpp:35
Definition: WorldObject_Tree.hpp:26
WorldObject_Tree(int _growth=0)
Definition: WorldObject_Tree.cpp:12
virtual ~WorldObject_Tree()
Definition: WorldObject_Tree.hpp:34