Read an NSDictionary from a plist file and parse it automatically for animations */
| 248 | |
| 249 | /** Read an NSDictionary from a plist file and parse it automatically for animations */ |
| 250 | void AnimationCache::addAnimationsWithFile(std::string_view plist) |
| 251 | { |
| 252 | AXASSERT(!plist.empty(), "Invalid texture file name"); |
| 253 | if (plist.empty()) |
| 254 | { |
| 255 | AXLOGE("{} error:file name is empty!", __FUNCTION__); |
| 256 | return; |
| 257 | } |
| 258 | |
| 259 | ValueMap dict = FileUtils::getInstance()->getValueMapFromFile(plist); |
| 260 | |
| 261 | AXASSERT(!dict.empty(), "CCAnimationCache: File could not be found"); |
| 262 | if (dict.empty()) |
| 263 | { |
| 264 | AXLOGE("AnimationCache::addAnimationsWithFile error:{} not exist!", plist); |
| 265 | } |
| 266 | |
| 267 | addAnimationsWithDictionary(dict, plist); |
| 268 | } |
| 269 | |
| 270 | } |