浏览代码

Default the application timer to NanoTimer. I did this
during construction so that the default JmeContext timer
could potentially still be used by calling app.setTimer(null)
from an apps main(). In that case, the previous behavior
of pulling the timer from JmeContext during init would happen.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8588 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

PSp..om 14 年之前
父节点
当前提交
d2e2935d90
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      engine/src/core/com/jme3/app/Application.java

+ 2 - 1
engine/src/core/com/jme3/app/Application.java

@@ -59,6 +59,7 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.logging.Logger;
 import com.jme3.system.JmeContext.Type;
 import com.jme3.system.JmeContext.Type;
 import com.jme3.system.JmeSystem;
 import com.jme3.system.JmeSystem;
+import com.jme3.system.NanoTimer;
 import com.jme3.system.SystemListener;
 import com.jme3.system.SystemListener;
 import com.jme3.system.Timer;
 import com.jme3.system.Timer;
 
 
@@ -87,7 +88,7 @@ public class Application implements SystemListener {
 
 
     protected JmeContext context;
     protected JmeContext context;
     protected AppSettings settings;
     protected AppSettings settings;
-    protected Timer timer;
+    protected Timer timer = new NanoTimer();
     protected Camera cam;
     protected Camera cam;
     protected Listener listener;
     protected Listener listener;