Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "PhysicsMaterial.h"
- #include "Leadwerks.h"
- namespace Leadwerks {
- /*Static: DeletePhysicsMaterial*/
- static void DeletePhysicsMaterial(Material* mat) {
- delete GetPhysicsFromMaterial(mat);
- }
- PhysicsMaterial::PhysicsMaterial(Material* mat) {
- mat->SetUserData((void*)this);
- mat->AddHook(Object::DeleteHook, DeletePhysicsMaterial);
- if (mat->GetPath() == "") {
- surfaceProperty = "default";
- }
- else {
- surfaceProperty = Util::GetKeyValueFromFile(mat->GetPath(), "surfaceprop");
- }
- }
- std::string PhysicsMaterial::GetSurfaceProperty() {
- if (surfaceProperty != "") {
- return surfaceProperty;
- }
- return "default";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement