mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
rename node.hpp to cocos.hpp + add function for checking if sprite
exists
This commit is contained in:
parent
138eddc36d
commit
d1c83b5dae
3 changed files with 14 additions and 3 deletions
|
@ -11,7 +11,6 @@ namespace geode::cast {}
|
|||
namespace geode::cocos {}
|
||||
namespace geode::utils {}
|
||||
namespace geode::helper {}
|
||||
namespace geode::node {}
|
||||
namespace geode::op {}
|
||||
namespace geode::stream {}
|
||||
namespace geode::view {}
|
||||
|
@ -25,7 +24,6 @@ namespace cocos2d::extension {}
|
|||
using namespace geode::cocos; \
|
||||
using namespace geode::helper; \
|
||||
using namespace geode::utils; \
|
||||
using namespace geode::node; \
|
||||
using namespace geode::op; \
|
||||
using namespace geode::stream; \
|
||||
using namespace geode::view; \
|
||||
|
|
|
@ -68,4 +68,17 @@ namespace geode::cocos {
|
|||
* not take into account if node is off-screen
|
||||
*/
|
||||
GEODE_DLL bool nodeIsVisible(cocos2d::CCNode* node);
|
||||
|
||||
/**
|
||||
* Checks if a given file exists in CCFileUtils
|
||||
* search paths.
|
||||
* @param filename File to check
|
||||
* @returns True if file exists
|
||||
* @example if (fileExistsInSearchPaths("mySprite.png"_spr)) {
|
||||
* CCSprite::create("mySprite.png"_spr);
|
||||
* } else {
|
||||
* CCSprite::create("fallback.png");
|
||||
* }
|
||||
*/
|
||||
GEODE_DLL bool fileExistsInSearchPaths(const char* filename);
|
||||
}
|
|
@ -9,5 +9,5 @@
|
|||
#include "timer.hpp"
|
||||
#include "ext.hpp"
|
||||
#include "convert.hpp"
|
||||
#include "node.hpp"
|
||||
#include "cocos.hpp"
|
||||
#include "operators.hpp"
|
||||
|
|
Loading…
Reference in a new issue