mirror of https://github.com/axmolengine/axmol.git
update reader with skybox valid
This commit is contained in:
parent
c998639c30
commit
5a997cec1c
|
@ -84,6 +84,7 @@ namespace cocostudio
|
|||
std::string name = "";
|
||||
int skyBoxMask = 1;
|
||||
bool skyBoxEnabled = false;
|
||||
bool skyBoxValid = true;
|
||||
|
||||
std::string leftPath = "";
|
||||
std::string leftPlistFile = "";
|
||||
|
@ -127,6 +128,10 @@ namespace cocostudio
|
|||
{
|
||||
skyBoxEnabled = (value == "True") ? true : false;
|
||||
}
|
||||
else if (attriname == "SkyBoxValid")
|
||||
{
|
||||
skyBoxValid = (value == "True") ? true : false;
|
||||
}
|
||||
else if (attriname == "skyBoxMask")
|
||||
{
|
||||
skyBoxMask = atoi(value.c_str());
|
||||
|
@ -143,6 +148,9 @@ namespace cocostudio
|
|||
attribute = attribute->Next();
|
||||
}
|
||||
|
||||
if (!skyBoxValid)
|
||||
skyBoxEnabled = false;
|
||||
|
||||
const tinyxml2::XMLElement* child = objectData->FirstChildElement();
|
||||
while (child)
|
||||
{
|
||||
|
|
|
@ -109,6 +109,7 @@ namespace cocostudio
|
|||
float fov = 60.f;
|
||||
unsigned int cameraFlag = 0;
|
||||
bool skyBoxEnabled = false;
|
||||
bool skyBoxValid = true;
|
||||
|
||||
std::string attriname;
|
||||
const tinyxml2::XMLAttribute* attribute = objectData->FirstAttribute();
|
||||
|
@ -142,10 +143,17 @@ namespace cocostudio
|
|||
{
|
||||
skyBoxEnabled = (value == "True") ? true : false;
|
||||
}
|
||||
else if (attriname == "SkyBoxValid")
|
||||
{
|
||||
skyBoxValid = (value == "True") ? true : false;
|
||||
}
|
||||
|
||||
attribute = attribute->Next();
|
||||
}
|
||||
|
||||
if (!skyBoxValid)
|
||||
skyBoxEnabled = false;
|
||||
|
||||
Vec2 clipPlane(1, 1000);
|
||||
|
||||
std::string leftPath = "";
|
||||
|
|
Loading…
Reference in New Issue