@@ -0,0 +1,1341 @@
+package com.ezardlabs.lostsector.missions;%0A%0Aimport com.ezardlabs.dethsquare.GameObject;%0Aimport com.ezardlabs.dethsquare.Script;%0Aimport com.ezardlabs.dethsquare.prefabs.PrefabManager;%0A%0Aimport java.util.LinkedHashMap;%0Aimport java.util.Map.Entry;%0Aimport java.util.concurrent.ThreadLocalRandom;%0A%0Apublic class SpawnPoint extends Script %7B%0A%09private static final LinkedHashMap%3CString, Float%3E enemyChances = new LinkedHashMap%3C%3E();%0A%09private static final long minInterval = 2000;%0A%09private static final long maxInterval = 20000;%0A%0A%09private long nextSpawn = 0;%0A%0A%09static %7B%0A%09%09enemyChances.put(%22dera_crewman%22, 0.3f);%0A%09%09enemyChances.put(%22prova_crewman%22, 0.5f);%0A%09%09enemyChances.put(%22supra_crewman%22, 0.2f);%0A%09%7D%0A%0A%09@Override%0A%09public void update() %7B%0A%09%09if (System.currentTimeMillis() %3E nextSpawn) %7B%0A%09%09%09String enemyPrefab = getSpawn();%0A%09%09%09if (enemyPrefab != null) %7B%0A%09%09%09%09GameObject.instantiate(PrefabManager.loadPrefab(getSpawn()), transform.position);%0A%09%09%09%7D%0A%09%09%09nextSpawn = System.currentTimeMillis() + ThreadLocalRandom.current().nextLong(minInterval, maxInterval + 1);%0A%09%09%7D%0A%09%7D%0A%0A%09private static String getSpawn() %7B%0A%09%09double rand = Math.random();%0A%09%09float total = 0;%0A%0A%09%09for (Entry%3CString, Float%3E entry : enemyChances.entrySet()) %7B%0A%09%09%09if (rand %3C entry.getValue() + total) %7B%0A%09%09%09%09return entry.getKey();%0A%09%09%09%7D else %7B%0A%09%09%09%09total += entry.getValue();%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return null;%0A%09%7D%0A%7D%0A

Add spawn point