|
@@ -31,6 +31,8 @@ public class ThreatIndicatorGLRenderer implements Renderer {
|
|
|
public static final int kThreatLevelNoThreat = 1;
|
|
|
public static final int kThreatLevelPastThreat = 2;
|
|
|
public static final int kThreatLevelPersistentThreat = 3;
|
|
|
+
|
|
|
+ private static boolean sPlayGreetingAnimation = true; // greet the first time
|
|
|
|
|
|
/**
|
|
|
* Set the threat level which should be indicated
|
|
@@ -94,7 +96,12 @@ public class ThreatIndicatorGLRenderer implements Renderer {
|
|
|
try {
|
|
|
InputStream is = assets.open("meshes/android.amh");
|
|
|
androidMesh = new AnimatedMesh(is);
|
|
|
- androidMesh.startAction("greet", false, false);
|
|
|
+ /* play the greeting animation the first time the gets opened
|
|
|
+ not each time the threatindicator gets created */
|
|
|
+ if (sPlayGreetingAnimation) {
|
|
|
+ androidMesh.startAction("greet", false, false);
|
|
|
+ sPlayGreetingAnimation = false;
|
|
|
+ }
|
|
|
} catch (IOException e) {
|
|
|
Log.e("gl", "Couldn't open android mesh");
|
|
|
}
|