Data Locality Pattern html a little bug
The hot piece is the main AI component. It’s the one we need to use the most, so we don’t want to chase a pointer to find it. The cold component can be off to the side, but we still need to get to it, so we give the hot component a pointer to it, like so
-- above is the original passage of the Data Locality Pattern in the html mode. the last sentence。I think you made a describe mistake, it should be a [cold] component a pointer to it not [hot].because it follows code like that: And the loot is a pointer, it is a code component. It's a very tiny bug,thank you for your book,I really like it.You are awesome. ===========origine code in html start ===================== class AIComponent { public: // Methods... private: Animation* animation_; double energy_; Vector goalPos_;
LootDrop* loot_; }; ===========origine code in html end =====================