MCPcopy Create free account
hub / github.com/axmolengine/axmol / addAnimationsWithFile

Method addAnimationsWithFile

core/2d/AnimationCache.cpp:250–268  ·  view source on GitHub ↗

Read an NSDictionary from a plist file and parse it automatically for animations */

Source from the content-addressed store, hash-verified

248
249/** Read an NSDictionary from a plist file and parse it automatically for animations */
250void 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}

Callers 2

onEnterMethod · 0.80
AnimationCacheFileMethod · 0.80

Calls 3

getInstanceFunction · 0.85
getValueMapFromFileMethod · 0.80
emptyMethod · 0.45

Tested by 2

onEnterMethod · 0.64
AnimationCacheFileMethod · 0.64