We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fdfe54 commit d734ea8Copy full SHA for d734ea8
cocos2d/CCCache.h
@@ -45,6 +45,7 @@
45
- (instancetype)init;
46
47
- (void)preload:(id<NSCopying>)key;
48
+- (BOOL)keyExists:(id<NSCopying>)key;
49
50
- (id)rawObjectForKey:(id<NSCopying>)key;
51
- (id)objectForKey:(id<NSCopying>)key;
cocos2d/CCCache.m
@@ -115,6 +115,11 @@ - (void)makeAlias:(id<NSCopying>)alias forKey:(id<NSCopying>)key
115
[_cacheList setObject:entry forKey:alias];
116
}
117
118
+- (BOOL)keyExists:(id<NSCopying>)key
119
+{
120
+ return([_cacheList objectForKey:key] != nil);
121
+}
122
+
123
//------------------------------------------------------------------------------
124
125
- (void)flush
0 commit comments