Pārlūkot izejas kodu

TestGltfUnlit: simplify

Stephen Gold 4 gadi atpakaļ
vecāks
revīzija
88effd4a5e

+ 4 - 10
jme3-examples/src/main/java/jme3test/light/TestGltfUnlit.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2019 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -32,7 +32,6 @@
 package jme3test.light;
 
 import com.jme3.app.SimpleApplication;
-import com.jme3.input.controls.ActionListener;
 import com.jme3.math.ColorRGBA;
 import com.jme3.math.Vector3f;
 
@@ -43,7 +42,7 @@ import com.jme3.math.Vector3f;
  * @author Markil 3
  * @version 3.3.0-SNAPSHOT
  */
-public class TestGltfUnlit extends SimpleApplication implements ActionListener {
+public class TestGltfUnlit extends SimpleApplication {
     public static void main(String[] args) {
         TestGltfUnlit testUnlit = new TestGltfUnlit();
         testUnlit.start();
@@ -51,17 +50,12 @@ public class TestGltfUnlit extends SimpleApplication implements ActionListener {
 
     @Override
     public void simpleInitApp() {
-
         ColorRGBA skyColor = new ColorRGBA(0.5f, 0.6f, 0.7f, 0.0f);
 
         flyCam.setMoveSpeed(20);
         viewPort.setBackgroundColor(skyColor.mult(0.9f));
 
-        this.cam.setLocation(new Vector3f(0, 10, 20));
-        this.rootNode.attachChild(this.getAssetManager().loadModel("jme3test/scenes/unlit.gltf"));
-    }
-
-    @Override
-    public void onAction(String name, boolean isPressed, float tpf) {
+        cam.setLocation(new Vector3f(0, 10, 20));
+        rootNode.attachChild(getAssetManager().loadModel("jme3test/scenes/unlit.gltf"));
     }
 }