Example #1
0
void CSkyClouds::Prep ()
{

	//
	// Load the texture
	//

	const char *pszTexture = GetTextureName ();
	SetTextureIndex (g_sTextureManager .FindNormalN (pszTexture));
}
void MeshComponent::SetProperties(const rapidjson::Value& properties)
{
	Super::SetProperties(properties);

	int textureIndex;
	std::string meshName;

	if(GetStringFromJSON(properties, "mesh", meshName))
	{
		auto mesh = mOwner.GetGame().GetAssetCache().Load<Mesh>(meshName);

		SetMesh(mesh);

		if(GetIntFromJSON(properties, "textureIndex", textureIndex))
		{
			SetTextureIndex(textureIndex);
		}
	}
}