Pārlūkot izejas kodu

Added an accessor for Timer.
Moved the creation of the state manager into
the constructor. Logically it should exist
as early as possible.


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

PSp..om 13 gadi atpakaļ
vecāks
revīzija
05a88493a8
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. 5 1
      engine/src/core/com/jme3/app/Application.java

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

@@ -99,6 +99,7 @@ public class Application implements SystemListener {
      * Create a new instance of <code>Application</code>.
      */
     public Application(){
+        initStateManager();
     }
 
     /**
@@ -206,6 +207,10 @@ public class Application implements SystemListener {
         if (renderManager != null) {
             renderManager.setTimer(timer);
         }
+    }
+    
+    public Timer getTimer(){
+        return timer;
     } 
 
     private void initDisplay(){
@@ -497,7 +502,6 @@ public class Application implements SystemListener {
             initInput();
         }
         initAudio();
-        initStateManager();
 
         // update timer so that the next delta is not too large
 //        timer.update();