- add AppState template
- small fix in Control template git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8650 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
3e0ab2bd64
commit
71ee1ba5d1
@ -0,0 +1,14 @@
|
|||||||
|
<!--
|
||||||
|
To change this template, choose Tools | Templates
|
||||||
|
and open the template in the editor.
|
||||||
|
-->
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div>A generic AppState that allows adding global behavior to your application.</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,40 @@
|
|||||||
|
<#assign licenseFirst = "/*">
|
||||||
|
<#assign licensePrefix = " * ">
|
||||||
|
<#assign licenseLast = " */">
|
||||||
|
<#include "../Licenses/license-${project.license}.txt">
|
||||||
|
|
||||||
|
<#if package?? && package != "">
|
||||||
|
package ${package};
|
||||||
|
|
||||||
|
</#if>
|
||||||
|
import com.jme3.app.Application;
|
||||||
|
import com.jme3.app.state.AbstractAppState;
|
||||||
|
import com.jme3.app.state.AppStateManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author ${user}
|
||||||
|
*/
|
||||||
|
public class ${name} extends AbstractAppState{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize(AppStateManager stateManager, Application app) {
|
||||||
|
super.initialize(stateManager, app);
|
||||||
|
//TODO: initialize your AppState, e.g. attach spatials to rootNode
|
||||||
|
//this is called on the OpenGL thread after the AppState has been attached
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(float tpf) {
|
||||||
|
//TODO: implement behavior during runtime
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void cleanup() {
|
||||||
|
super.cleanup();
|
||||||
|
//TODO: clean up what you initialized in the initialize method,
|
||||||
|
//e.g. remove all spatials from rootNode
|
||||||
|
//this is called on the OpenGL thread after the AppState has been detached
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -6,6 +6,7 @@
|
|||||||
<#if package?? && package != "">
|
<#if package?? && package != "">
|
||||||
package ${package};
|
package ${package};
|
||||||
|
|
||||||
|
</#if>
|
||||||
import com.jme3.export.InputCapsule;
|
import com.jme3.export.InputCapsule;
|
||||||
import com.jme3.export.JmeExporter;
|
import com.jme3.export.JmeExporter;
|
||||||
import com.jme3.export.JmeImporter;
|
import com.jme3.export.JmeImporter;
|
||||||
@ -17,7 +18,6 @@ import com.jme3.scene.control.AbstractControl;
|
|||||||
import com.jme3.scene.control.Control;
|
import com.jme3.scene.control.Control;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
</#if>
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author ${user}
|
* @author ${user}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
</file>
|
</file>
|
||||||
</folder>
|
</folder>
|
||||||
</folder>
|
</folder>
|
||||||
<folder name="JME3Classes">
|
<folder name="JME3 Classes">
|
||||||
<attr name="position" intvalue="200"/>
|
<attr name="position" intvalue="200"/>
|
||||||
<file name="Control.java" url="files/Control.template">
|
<file name="Control.java" url="files/Control.template">
|
||||||
<attr name="instantiatingIterator" methodvalue="org.netbeans.spi.java.project.support.ui.templates.JavaTemplates.createJavaTemplateIterator"/>
|
<attr name="instantiatingIterator" methodvalue="org.netbeans.spi.java.project.support.ui.templates.JavaTemplates.createJavaTemplateIterator"/>
|
||||||
@ -26,6 +26,16 @@
|
|||||||
<!--attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.java.project.Bundle"/-->
|
<!--attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.java.project.Bundle"/-->
|
||||||
<attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/modules/java/resources/class.gif"/>
|
<attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/modules/java/resources/class.gif"/>
|
||||||
</file>
|
</file>
|
||||||
|
<file name="AppState.java" url="files/AppState.template">
|
||||||
|
<attr name="instantiatingIterator" methodvalue="org.netbeans.spi.java.project.support.ui.templates.JavaTemplates.createJavaTemplateIterator"/>
|
||||||
|
<attr name="position" intvalue="200"/>
|
||||||
|
<attr name="templateCategory" stringvalue="java-classes, java-classes-basic"/>
|
||||||
|
<attr name="template" boolvalue="true"/>
|
||||||
|
<attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
|
||||||
|
<attr name="templateWizardURL" urlvalue="nbresloc:/com/jme3/gde/templates/files/AppState.html"/>
|
||||||
|
<!--attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.java.project.Bundle"/-->
|
||||||
|
<attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/modules/java/resources/class.gif"/>
|
||||||
|
</file>
|
||||||
</folder>
|
</folder>
|
||||||
</folder>
|
</folder>
|
||||||
</filesystem>
|
</filesystem>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user