| 861 | } |
| 862 | |
| 863 | bool GameObjectPool::SetImgState(size_t id, BlendMode m, fcyColor c)LNOEXCEPT |
| 864 | { |
| 865 | GameObject* p = m_ObjectPool.Data(id); |
| 866 | if (!p) |
| 867 | return false; |
| 868 | if (p->res) |
| 869 | { |
| 870 | switch (p->res->GetType()) |
| 871 | { |
| 872 | case ResourceType::Sprite: |
| 873 | static_cast<ResSprite*>(p->res)->SetBlendMode(m); |
| 874 | static_cast<ResSprite*>(p->res)->GetSprite()->SetColor(c); |
| 875 | break; |
| 876 | case ResourceType::Animation: |
| 877 | do { |
| 878 | ResAnimation* ani = static_cast<ResAnimation*>(p->res); |
| 879 | ani->SetBlendMode(m); |
| 880 | for (size_t i = 0; i < ani->GetCount(); ++i) |
| 881 | ani->GetSprite(i)->SetColor(c); |
| 882 | } while (false); |
| 883 | break; |
| 884 | default: |
| 885 | break; |
| 886 | } |
| 887 | } |
| 888 | return true; |
| 889 | } |
| 890 | |
| 891 | bool GameObjectPool::BoxCheck(size_t id, double left, double right, double top, double bottom, bool& ret)LNOEXCEPT |
| 892 | { |
nothing calls this directly
no test coverage detected