* Fix crash in TestWalkingChar * Fix crash in TestDopper * Fix crash in TestApplication * Fix deprecation warnings in audio tests * Fixed issues with particle emitter cloning and import/export * Fixed TempVars crashes in BoundingSphere * Fixed incorrect deprecation warning in AudioNode * Added smart caching to materials * Added test to verify that particle export and cloning is working correctly git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7907 75d07b2b-3a1a-0410-a2c5-0572b91ccdca3.0
parent
7cd213b940
commit
026a72d57e
@ -0,0 +1,29 @@ |
||||
package com.jme3.asset; |
||||
|
||||
import com.jme3.material.Material; |
||||
|
||||
/** |
||||
* Used for loading {@link Material materials} only (not material definitions). |
||||
* |
||||
* @author Kirill Vainer |
||||
*/ |
||||
public class MaterialKey extends AssetKey { |
||||
public MaterialKey(String name){ |
||||
super(name); |
||||
} |
||||
|
||||
public MaterialKey(){ |
||||
super(); |
||||
} |
||||
|
||||
@Override |
||||
public boolean useSmartCache(){ |
||||
return true; |
||||
} |
||||
|
||||
@Override |
||||
public Object createClonedInstance(Object asset){ |
||||
Material mat = (Material) asset; |
||||
return mat.clone(); |
||||
} |
||||
} |
Loading…
Reference in new issue