Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (777)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
  JavaGaming.org - Pastebin



Author: hadezbladez (posted 2018-11-16 13:35:35, viewed 287 times)

1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28   29   30   31   32   33   34   35   36   37   38   39   40   41   42   43   44   45   46   47   48   49   50   51   52   53   54   55   56   57   58   59   60   61   62   63   64   65   66   67   68   69   70   71   72   73   74   75   76   77   78   79   80   81   82   83   84   85   86   87   88   89   90   91   92   93   94   95   96   97   98   99   100   101   102   103   104   105   106   107   108   109   110   111   112   113   114   115   116   117   118   119   120   121   122   123   124   125   126   127   128   129   130   131   132   133   134   135   136   137   138   139   140   141   142   143   144   145   146   147   148   149   150   151   152   153   154   155   156   157   158   159   160   161   162   163   164   165   166   167   168   169   170   171   172   173   174   175   176   177   178   179   180   181   182   183   184   185   186   187   188   189   190   191   192   193   194   195   196   197   198   199   200   201   202   203   204   205   206   207   208   209   210   211   212   213   214   215   216   217   218   219   220   221   222   223   224   225   226   227   228   229   230   231   232   233   234   235   236   237   238   239   240   241   242   243   244   245   246   247   248   249   250   251   252   253   254   255   256   257   258   259   260   261   262   263   264   265   266   267   268   269   270   271   272   273   274   275   276   277   278   279   280   281   282   283   284   285   286   287   288   289   290   291   292   293   294   295   296   297   298   299   300   301   302   303   304   305   306   307   308   309   310   311   312   313   314   315   316   317   318   319   320   321   322   323   324   325   326   327   328   329   330   331   332   333   334   335   336   337   338   339   340   341   342   343   344   345   346   347   348   349   350   351   352   353   354   355   356   357   358   359   360   361   362   363   364   365   366   367   368   369   370   371   372   373   374   375   376   377   378   379   380   381   382   383   384   385   386   387   388   389   390   391   392   393   394   395   396   397   398   399   400   401   402   403   404   405   406   407   408   409   410   411   412   413   414   415   416   417   418   419   420   421   422   423   424   425   426   427   428   429   430   431   432   433   434   435   436   437   438   439   440   441   442   443   444   445   446   447   448   449   450   451   452   453   454   455   456   457   458   459   460   461   462   463   464   465   466   467   468   469   470   471   472   473   474   475   476   477   478   479   480   481   482   483   484   485   486   487   488   489   490   491   492   493   494   495   496   497   498   499   500   501   502   503   504   505   506   507   508   509   510   511   512   513   514   515   516   517   518   519   520   521   522   523   524   525   526   527   528   529   530   531   532   533   534   535   536   537   538   539   540   541   542   543   544   545   546   547   548   549   550   551   552   553   554   555   556   557   558   559   560   561   562   563   564   565   566   567   568   569   570   571   572   573   574   575   576   577   578   579   580   581   582   583   584   585   586   587   588   589   590   591   592   593   594   595   596   597   598   599   600   601   602   603   604   605   606   607   608   609   610   611   612   613   614   615   616   617   618   619   620   621   622   623   624   625   626   627   628   629   630   631   632   633   634   635   636   637   638   639   640   641   642   643   644   645   646   647   648   649   650   651   652   653   654   655   656   657   658   659   660   661   662   663   664   665   666   667   668   669   670   671   672   673   674   675   676   677   678   679   680   681   682   683   684   685   686   687   688   689   690   691   692   693   694   695   696   697   698   699   700   701   702   703   704   705   706   707   708   709   710   711   712   713   714   715   716   717   718   719   720   721   722   723   724   725   726   727   728   729   730   731   732   733   734   735   736   737   738   739   740   741   742   743   744   745   746   747   748   749   750   751   752   753   754   755   756   757   758   759   760   761   762   763   764   765   766   767   768   769   770   771   772   773   774   775   776   777   778   779   780   781   782   783   784   785   786   787   788   789   790   791   792   793   794   795   796   797   798   799   800   801   802   803   804   805   806   807   808   809   810   811   812   813   814   815   816   817   818   819   820   821   822   823   824   825   826   827   828   829   830   831   832   833   834   835   836   837   838   839   840   841   842   843   844   845   846   847   848   849   850   851   852   853   854   855   856   857   858   859   860   861   862   863   864   865   866   867   868   869   870   871   872   873   874   875   876   877   878   879   880   881   882   883   884   885   886   887   888   889   890   891   892   893   894   895   896   897   898   899   900   901   902   903   904   905   906   907   908   909   910   911   912   913   914   915   916   917   918   919   920   921   922   923   924   925   926   927   928   929   930   931   932   933   934   935   936   937   938   939   940   941   942   943   944   945   946   947   948   949   950   951   952   953   954   955   956   957   958   959   960   961   962   963   964   965   966   967   968   969   970   971   972   973   974   975   976   977   978   979   980   981   982   983   984   985   986   987   988   989   990   991   992   993   994   995   996   997   998   999   1000   1001   1002   1003   1004   1005   1006   1007   1008   1009   1010   1011   1012   1013   1014   1015   1016   1017   1018   1019   1020   1021   1022   1023   1024   1025   1026   1027   1028   1029   1030   1031   1032   1033   1034   1035   1036   1037   1038   1039   1040   1041   1042   1043   1044   1045   1046   1047   1048   1049   1050   1051   1052   1053   1054   1055   1056   1057   1058   1059   1060   1061   1062   1063   1064   1065   1066   1067   1068   1069   1070   1071   1072   1073   1074   1075   1076   1077   1078   1079   1080   1081   1082   1083   1084   1085   1086   1087   1088   1089   1090   1091   1092   1093   1094   1095   1096   1097   1098   1099   1100   1101   1102   1103   1104   1105   1106   1107   1108   1109   1110   1111   1112   1113   1114   1115   1116   1117   1118   1119   1120   1121   1122   1123   1124   1125   1126   1127   1128   1129   1130   1131   1132   1133   1134   1135   1136   1137   1138   1139   1140   1141   1142   1143   1144   1145   1146   1147   1148   1149   1150   1151   1152   1153   1154   1155   1156   1157   1158   1159   1160   1161   1162   1163   1164   1165   1166   1167   1168   1169   1170   1171   1172   1173   1174   1175   1176   1177   1178   1179   1180   1181   1182   1183   1184   1185   1186   1187   1188   1189   1190   1191   1192   1193   1194   1195   1196   1197   1198   1199   1200   1201   1202   1203   1204   1205   1206   1207   1208   1209   1210   1211   1212   1213   1214   1215   1216   1217   1218   1219   1220   1221   1222   1223   1224   1225   1226   1227   1228   1229   1230   1231   1232   1233   1234   1235   1236   1237   1238   1239   1240   1241   1242   1243   1244   1245   1246   1247   1248   1249   1250   1251   1252   1253   1254   1255   1256   1257   1258   1259   1260   1261   1262   1263   1264   1265   1266   1267   1268   1269   1270   1271   1272   1273   1274   1275   1276   1277   1278   1279   1280   1281   1282   1283   1284   1285   1286   1287   1288   1289   1290   1291   1292   1293   1294   1295   1296   1297   1298   1299   1300   1301   1302   1303   1304   1305   1306   1307   1308   1309   1310   1311   1312   1313   1314   1315   1316   1317   1318   1319   1320   1321   1322   1323   1324   1325   1326   1327   1328   1329   1330   1331   1332   1333   1334   1335   1336   1337   1338   1339   1340   1341   1342   1343   1344   1345   1346   1347   1348   1349   1350   1351   1352   1353   1354   1355   1356   1357   1358   1359   1360   1361   1362   1363   1364   1365   1366   1367   1368   1369   1370   1371   1372   1373   1374   1375   1376   1377   1378   1379   1380   1381   1382   1383   1384   1385   1386   1387   1388   1389   1390   1391   1392   1393   1394   1395   1396   1397   1398   1399   1400   1401   1402   1403   1404   1405   1406   1407   1408   1409   1410   1411   1412   1413   1414   1415   1416   1417   1418   1419   1420   1421   1422   1423   1424   1425   1426   1427   1428   1429   1430   1431   1432   1433   1434   1435   1436   1437   1438   1439   1440   1441   1442   1443   1444   1445   1446   1447   1448   1449   1450   1451   1452   1453   1454   1455   1456   1457   1458   1459   1460   1461   1462   1463   1464   1465   1466   1467   1468   1469   1470   1471   1472   1473   1474   1475   1476   1477   1478   1479   1480   1481   1482   1483   1484   1485   1486   1487   1488   1489   1490   1491   1492   1493   1494   1495   1496   1497   1498   1499   1500   1501   1502   1503   1504   1505   1506   1507   1508   1509   1510   1511   1512   1513   1514   1515   1516   1517   1518   1519   1520  
public class LevelA1 extends GameLevelState{
   //a quest about this level || this might be a spoiler
        //
       
   /*
   1. u do not have dagger to stab, weaponItem and dash skill (done)
   2. scroll from <-left to right-> so this level have pitfalls (done)
   3. there is a gem room after getting something (done)
   4. joke item of heart (done)
   5. pause systems (done)
   6. free-ing the memories (no)
   7. more sign on how to play arrow left and right (done)
   8. for levelA1 die till zero live will be cue scene more than game over
   9. scene to gameoverA1 and to next event is not complete
   10. complete?
   
         //check 4 secrets
         start positions = 500-520
         1. 60-300
         2. 2700-400
         3. 3000-350
         4. 4700-270 open secrets
         5. 4700-500
         6. 6000-270 last secrets challenge
         
   
   
   */
   
   ////----cores----////
   private Background frontBG, baseBG;
   //objects
   private Item item;
   private Enemy enemy;
   private Environment environment;
   private Glint glint;
   //special objects
   private Item flyingBottle;
   private SignBoard postSign1, postSign2;
   
   
   //special clear and goal
   private int heartCount;
   private boolean posionGet;
   
   //arrowSign || why this is complex?
   private WordSign ws1, ws2;
   private int arrowSignStatus;
   private long arrowSignTimer;
   
   ////----parameters----////
   public LevelA1(StateManager stateManager) {super.stateManager = stateManager;}
   
   @Override public void init() {
      System.out.println("LevelA1.init() + array loaded & tilemap");
      
      randomGenerator = new Random();
      tilemap = new Tilemap();
      backTilemap = new Tilemap();
      
      //arrays
      items = new ArrayList<Item>();
      environments = new ArrayList<Environment>();
      enemies = new ArrayList<Enemy>();
      explosions = new ArrayList<Explosion>();
      particles = new ArrayList<Particle>();
      itemThrows = new ArrayList<ThrowItem>();
      trails = new ArrayList<Trail>();
      glints = new ArrayList<Glint>();
   }
   @Override public void update() {
      controls();
      
      //main state of the update
      if(pause){pauseState();}
      else if(!pause){playingState();}//do we need a time function in here??
      
      //events || can we do it in here? ||i think we can do it in here
      if(!eventCountBoolean){eventTrigger();}
      eventManager();
      eventActive();
   }
   @Override public void render(Graphics g) {
      if(drawAll){
         //background
         if(baseBG != null){baseBG.render(g);}
         if(frontBG != null){frontBG.render(g);}
         //back tileMap
         if(backTilemap != null){backTilemap.render(g);}
         
         //objects before tileMap
         if(environments != null){//environments
            for(int i = 0; i < environments.size(); i++){environments.get(i).render(g);}
         }
         if(enemies != null){//enemies
            for(int i = 0; i < enemies.size(); i++){enemies.get(i).render(g);}
         }
         if(items != null){//items
            for(int i = 0; i < items.size(); i++){
               if(items.get(i).isHidingFromTilemap() ){items.get(i).render(g);}
            }
         }
         if(player != null){player.render(g);}
         if(goalTeleport != null){goalTeleport.render(g);}
         
         
         if(tilemap != null){tilemap.render(g);}
         
         
         //objects after tileMap
         if(items != null){//items
            for(int i = 0; i < items.size(); i++){
               if(trails != null){
                  for(int j = 0; j < trails.size(); j++){
                     if(trails.get(j).getRenderOrder() == Trail.PULSES_ON_MAP){trails.get(j).render(g);}
                  }
               }
               if(!items.get(i).isHidingFromTilemap() ){items.get(i).render(g);}
            }
         }
         
         //addition
         if(explosions != null){//explosions
            for(int i = 0; i < explosions.size(); i++){explosions.get(i).render(g);}
         }
         if(particles != null){//particles
            for(int i = 0; i < particles.size(); i++){particles.get(i).render(g);}
         }
         if(glints != null){//glints
            for(int i = 0; i  < glints.size(); i++){glints.get(i).render(g);}
         }
         
         //HUD parameter
         if(hudParameter != null){hudParameter.render(g);}
         

      }
      
      if(!renderAfterPauseScreen){
         if(rectangleBoxes != null){
            if(!rectangleBoxes.isEmpty() ){
               if(blackScreen_Render1){
                  Graphics2D g2d = (Graphics2D) g;
                  g2d.setColor(new Color(0, 0, 0, alpha1) );
                  for(int i = 0; i < rectangleBoxes.size(); i++){
                     g2d.fill(rectangleBoxes.get(i) );
                  }
               }
            }
         }
      }

      //HUD pause
      if(hudPause != null){
         if(pause){hudPause.render(g);}
      }
      
      if(renderAfterPauseScreen){
         if(rectangleBoxes != null){
            if(!rectangleBoxes.isEmpty() ){
               if(blackScreen_Render1){
                  Graphics2D g2d = (Graphics2D) g;
                  g2d.setColor(new Color(0, 0, 0, alpha1) );
                  for(int i = 0; i < rectangleBoxes.size(); i++){
                     g2d.fill(rectangleBoxes.get(i) );
                  }
               }
            }
         }
      }
   }
   
   @Override public void enter() {
      super.enter();
      System.out.println("LevelA1.enter() + init all game things");
      if(GameEngine.assets == null){GameEngine.assets = new Assets(Assets.LEVEL_A1);}//new assets??
      else if(GameEngine.assets != null){
         System.out.println("LevelA1.enter() something loaded = " + GameEngine.assets);
         GameEngine.assets = null;
         GameEngine.assets = new Assets(Assets.LEVEL_A1);
      }
      sfxLoad();
      //note 4 short term memory || if(level unclear in STMemory.class) levelClear = false;
      
      //background
      baseBG = new Background(GameEngine.assets.baseBackground, GameEngine.game_width, GameEngine.game_height );
      baseBG.initSetMoveStyle_SEAMLESS_BasedOnTileMap(Background.HORIZONTAL, tilemap, 0.2);
      frontBG = new Background(GameEngine.assets.frontBackground, GameEngine.game_width, GameEngine.game_height );
      frontBG.initSetMoveStyle_SEAMLESS_BasedOnTileMap(Background.HORIZONTAL, tilemap, 0.4);
      if(backTilemap != null){backTilemap.setTileMaps(Tilemap.LEVELA1_MODEL2_BACK);}//this tileMap serve as a background
      
      if(tilemap != null){
         tilemap.setTileMaps(Tilemap.LEVELA1_MODEL2);
         
         player = new Player(tilemap, this);
         //GameEngine.mainMemory.insertAndSetPlayerParameters(player);//set player parameter
         player.settingParameter(GameEngine.mainMemory);//the function is same as above so u can choose one
         player.setPosition(500, 520);
         //initialize camera auto position set to players
         tilemap.setX(GameEngine.game_width / 2 - player.getX() );
         tilemap.setY(GameEngine.game_height / 2 - player.getY() );
         
         if(items != null){addItems();}
         if(enemies != null){addEnemies();}
         if(environments != null){addEnvironments();}
         
         //teleport //5750-500
         goalTeleport = new Teleport(tilemap, Teleport.SWIRLING_UP, true);
         goalTeleport.setPosition(5750, 500 + tilemap.getTileWidth() - goalTeleport.getCHeight() / 2);
         //teleport.setPosition(600, 500 + tilemap.getTileWidth() - teleport.getCHeight() / 2); //testing beforehand
         

         
         if(player != null){hudParameter = new HUD_parameter(player, false);}
         if(player != null){hudPause = new HUD_pauseParameter(this);}//do we need player parameters?
      }
      
      ////----events----////
      //cores
      eventCount = 0; eventCountBoolean = false;
      blockKeyInput = false;
      //start event
      startEvent = false; wasStartEvent = false;
      //finish event
      finishEvent = false; wasFinishEvent = false;
      
      //restart event
      restartEvent = false; wasRestartEvent = false;
      
      //game is starting
      rectangleBoxes = new ArrayList<Rectangle>();
      triggerStartEvent = true;
      //GameEngine.INSTANCE.setBlackScreenBoolean(false);//its already removed from blackscreens
      
      arrowSignStatus = 1;
      arrowSignTimer = System.nanoTime();
      
      ////----state Parameter----////
      pause = false;
   }
   @Override public void exit() {
      System.out.println("LevelA1.exit() + initialize back to normal");
      System.out.println("=============================================");
      System.out.println();
      
      baseBG.destructClass(); baseBG = null;
      frontBG.destructClass(); frontBG = null;
      goalTeleport.destructClass(); goalTeleport = null;
      
      items.clear(); items = null;
      environments.clear(); environment = null;
      enemies.clear(); enemies = null;
      explosions.clear(); explosions = null;
      particles.clear(); particles = null;
      itemThrows.clear(); itemThrows = null;
      trails.clear(); trails = null;
      
      if(ws1 != null){ws1.destructClass(); ws1 = null;} if(ws2 != null){ws2.destructClass(); ws2 = null;}
      if(postSign1 != null){postSign1.destructClass(); postSign1 = null;} if(postSign2 != null){postSign2.destructClass(); postSign2 = null;}
      super.destructObject();
      
      //remove assets??
      if(GameEngine.assets != null){GameEngine.assets.destructAllImage(); GameEngine.assets = null;}
   }
   @Override public String getName() {return "level_a1";}
   
   @Override public void pauseInitializement() {
      if(!eventCountBoolean){
         if(!pause){
            escButton = false;
            pause = true;
            
            pauseTimer = System.nanoTime();
            lastTime = System.nanoTime();
            //remainder starts to pause || there will be no notes in here
         }
      }
      
      if(GameEngine.INSTANCE.isSleeps() ){
         //deactivate all keys
         player.setLeft(false); player.setRight(false);
         player.setUp_objEnt(false);
         player.setKeepStanceButton(false); player.setJumpingButton(false);
         
         if(player.getDashLevel() != 0){player.setDashButton(false); player.setWasDashButton(false);}
         if(player.getStabLevel() != 0){player.setStabButton(false);}
         player.setThrowingButton(false);
         
         hudPause.setUpButton(false); hudPause.setDownButton(false);
         enterButton = false; escButton = false;
      }
   }
   
   ////initialize method
   //for enter() method
   protected void addEnemies(){
      //only 4 first initialize
      Slime slime = new Slime(tilemap);
      Point[] position = {
            new Point(1300, 300 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            new Point(1900, 500 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            new Point(2700, 200 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            
            new Point(3000, 150 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            new Point(3150, 150 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            new Point(3300, 150 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            new Point(3450, 150 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            
            new Point(3900, 450 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            new Point(4000, 450 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            new Point(4700, 250 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            new Point(5100, 200 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            new Point(5200, 200 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            new Point(5300, 200 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            
            new Point(6100, 100 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            new Point(6200, 100 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            new Point(6300, 100 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            new Point(6150, 100 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            new Point(6250, 100 + tilemap.getTileHeight() - slime.getCHeight() / 2),
            new Point(6350, 100 + tilemap.getTileHeight() - slime.getCHeight() / 2)
         };
      
      for(int i = 0; i < position.length; i++){
         slime = new Slime(tilemap);
         slime.setPosition(position[i].x, position[i].y);
         enemies.add(slime);
      }
      
      //remove unused class
      slime = null;
      position = null;
   }
   protected void addItems(){
      //vials
      item = new Food(tilemap, true, false, player, this, Food.VIAL1, false);
      item.initSetMoveStyle_Falling(50 + tilemap.getTileWidth()/2, 300 + tilemap.getTileHeight() - item.getCHeight() / 2 );
      items.add(item);
      
      item = new Food(tilemap, true, false, player, this, Food.VIAL1, false);
      item.initSetMoveStyle_Falling(3650, 450 + tilemap.getTileHeight() - item.getCHeight() / 2);
      items.add(item);
      
      item = new Food(tilemap, true, false, player, this, Food.VIAL1, false);
      item.initSetMoveStyle_Falling(4700, 500 + tilemap.getTileHeight() - item.getCHeight() / 2);
      items.add(item);
      
      //maybe u need to add some dust or cloud to have floating effect
      flyingBottle = new Food(tilemap, true, false, player, this, Food.VIAL1, false);
      flyingBottle.initSetMoveStyle_Moving(4700 + tilemap.getTileWidth()/2, 100, false, 2, 2, true, 0.07d);
      items.add(flyingBottle);
      
      //landMine
      item = new LandMine(tilemap, true, false, player, this);
      item.initSetMoveStyle_Falling(7000 + tilemap.getTileWidth() / 2, 500 + tilemap.getTileHeight() - item.getCHeight() / 2);
      ((LandMine)item).initSetLandMine_BehaviourStyle_PassiveToActive(player, 200);
      items.add(item);
      
      item = new LandMine(tilemap, true, false, player, this);
      item.initSetMoveStyle_Falling(7600 + tilemap.getTileWidth() / 2, 500 + tilemap.getTileHeight() - item.getCHeight() / 2);
      ((LandMine)item).initSetLandMine_BehaviourStyle_PassiveToActive(player, 200);
      items.add(item);
      
      //poison vial event items
      item = new Food(tilemap, true, false, player, this, Food.POISONVIAL1, false);
      item.initSetMoveStyle_Falling(8150, 500 + tilemap.getTileHeight() - item.getCHeight() / 2);
      items.add(item);
      
      //heart no kuni 2450-500, 2900-450 flying, 4200-250, 5900-300, 6750-500, 6850-500
      item = new Collectible(tilemap, false, false, player, this, Collectible.HEART);
      item.initSetMoveStyle_Falling(2450, 500 + tilemap.getTileHeight() - item.getCHeight() / 2);
      items.add(item);
      
      item = new Collectible(tilemap, false, false, player, this, Collectible.HEART);
      item.setPosition(2900 - 12, 400 + tilemap.getTileHeight() - item.getCHeight() / 2);
      items.add(item);
      
      item = new Collectible(tilemap, false, false, player, this, Collectible.HEART);
      item.initSetMoveStyle_Falling(4200 + tilemap.getTileWidth() / 2, 250 + tilemap.getTileHeight() - item.getCHeight() / 2);
      items.add(item);
      item = new Collectible(tilemap, false, false, player, this, Collectible.HEART);
      item.initSetMoveStyle_Falling(5900, 300 + tilemap.getTileHeight() - item.getCHeight() / 2);
      items.add(item);
      
      item = new Collectible(tilemap, false, false, player, this, Collectible.HEART);
      item.initSetMoveStyle_Falling(6750, 500 + tilemap.getTileHeight() - item.getCHeight() / 2);
      items.add(item);
      item = new Collectible(tilemap, false, false, player, this, Collectible.HEART);
      item.initSetMoveStyle_Falling(6850, 500 + tilemap.getTileHeight() - item.getCHeight() / 2);
      items.add(item);
      
   }
   protected void addEnvironments(){
      Rock rock = null; 
      Glint glint = null;
      WordSign helpSign = null;
      
      rock = new Rock(tilemap, 0, Rock.rockModel5, false, true, this);
      rock.setPosition(1100, 200 + tilemap.getTileHeight() - rock.getCHeight() /2);
      rock.initSetDestructionMode_DestroyerIsPlayer(Environment.DESTROYABLE, player, itemThrows);
      rock.setFacingRight(false);
      environments.add(rock);
      rock = new Rock(tilemap, 0, Rock.rockModel5, false, true, this);
      rock.setPosition(1550, 200 + tilemap.getTileHeight() - rock.getCHeight() /2 );
      rock.initSetDestructionMode_DestroyerIsPlayer(Environment.DESTROYABLE, player, itemThrows);
      rock.setFacingRight(true);
      environments.add(rock);
      
      rock = new Rock(tilemap, 0, Rock.rockModel3, false, true, this);
      rock.setPosition(1300 + tilemap.getTileWidth() / 2, 200 + tilemap.getTileHeight() - rock.getCHeight() /2 );
      rock.initSetDestructionMode_DestroyerIsPlayer(Environment.DESTROYABLE, player, itemThrows);
      rock.setFacingRight(true);
      environments.add(rock);
      rock = new Rock(tilemap, 0, Rock.rockModel3, true, true, this);
      rock.setPosition(1850, 200 + tilemap.getTileHeight() - rock.getCHeight() /2 );
      rock.initSetDestructionMode_DestroyerIsPlayer(Environment.DESTROYABLE, player, itemThrows);
      rock.setFacingRight(true);
      environments.add(rock);
      
      rock = new Rock(tilemap, 0, Rock.rockModel1, false, true, this);
      rock.setPosition(2200 + tilemap.getTileWidth() / 2, 500 + tilemap.getTileHeight() - rock.getCHeight() /2 );
      rock.initSetDestructionMode_DestroyerIsPlayer(Environment.DESTROYABLE, player, itemThrows);
      rock.setFacingRight(true);
      environments.add(rock);
      
      rock = new Rock(tilemap, 0, Rock.rockModel1, false, true, this);
      rock.setPosition(2700 + tilemap.getTileWidth() / 2, 200 + tilemap.getTileHeight() - rock.getCHeight() /2 );
      rock.initSetDestructionMode_DestroyerIsPlayer(Environment.DESTROYABLE, player, itemThrows);
      rock.setFacingRight(true);
      environments.add(rock);
      
      for(int i = 0; i < 8; i++){
         if(i == 3 || i == 6){}//go next
         else{
            randomNumbers = randomGenerator.nextBoolean() ? randomGenerator.nextInt(60) : - randomGenerator.nextInt(60);
            rock = new Rock(tilemap, 0, Rock.rockModel1, false, true, this);
            rock.setPosition(3100 + (i * 60) + randomNumbers + tilemap.getTileWidth() / 2 , 150 + tilemap.getTileHeight() - rock.getCHeight() /2 );
            rock.initSetDestructionMode_DestroyerIsPlayer(Environment.DESTROYABLE, player, itemThrows);
            rock.setFacingRight(randomGenerator.nextBoolean() );
            environments.add(rock);
         }
      }
      
      glint = new Glint(tilemap, Glint.whiteGlint1, this);
      if(items.indexOf(flyingBottle) != -1){
         glint.initSetAnimatingStyle_UNLIMITED_RESTRICTION(
               items.get(items.indexOf(flyingBottle) ).getX() - items.get(items.indexOf(flyingBottle) ).getCWidth()/ 2 + randomGenerator.nextInt(items.get(items.indexOf(flyingBottle) ).getCWidth() ),
               items.get(items.indexOf(flyingBottle) ).getY() + items.get(items.indexOf(flyingBottle) ).getCHeight()/4 + randomGenerator.nextInt(items.get(items.indexOf(flyingBottle) ).getCHeight()/4 ),
               false);
      }
      else{glint.initSetAnimatingStyle_UNLIMITED_RESTRICTION(500 + randomGenerator.nextInt(50), 100 + randomGenerator.nextInt(50), false);}//error level
      glints.add(glint);
      
      postSign1 = new SignBoard(tilemap, 0, SignBoard.post3, true, this);
      postSign1.setPosition(700, 500 + tilemap.getTileHeight() - postSign1.getCHeight() / 2);
      environments.add(postSign1);
      
      helpSign = new WordSign(tilemap, WordSign.escSign, 0, this);
      helpSign.setPosition(700, 500 - 40);
      helpSign.setFacingRight(true);
      environments.add(helpSign);
      
      //1100 200
      postSign2 = new SignBoard(tilemap, 0, SignBoard.post3, true, this);
      postSign2.setPosition(1100, 200 + tilemap.getTileHeight() - postSign2.getCHeight() / 2);
      environments.add(postSign2);
      
      //remove some unused objects
      rock = null; 
      glint = null;
      helpSign = null;
      
   }
   
   
   ////update methods
   //big updates method
   private void controls(){//primary control function || this is controlling this state rather than player
      //oldways();
      if(escButton){
         escButton = false;
         if(!pause){
            pause = true;
            
            //init timing systems
            pauseTimer = System.nanoTime();
            lastTime = System.nanoTime();
            
            //init note || changing notes by player intersecting something, bugging, or else
            if(player != null){
               if(postSign1 != null && environments.indexOf(postSign1) != -1 && player.intersects(postSign1) ){hudPause.setNoteModel(HUD_pauseParameter.NOTE101);}//postSign1 note
               else if(postSign1 != null && environments.indexOf(postSign1) != -1 && player.intersects(postSign2) ){hudPause.setNoteModel(HUD_pauseParameter.NOTE102);}
               else if(player.getY() > 600){hudPause.setNoteModel(HUD_pauseParameter.NOTE11);}//dead note
               else{hudPause.setNoteModel(HUD_pauseParameter.NO_NOTE);}
            }
         }
         else if(pause){
            pause = false;
            
            if(hudPause != null){if(hudPause.getNoteModel() != HUD_pauseParameter.NO_NOTE){hudPause.setNoteModel(HUD_pauseParameter.NO_NOTE);} }//render no note
         }
      }
      //this thing is already does not work
      /*else if(!GameEngine.INSTANCE.getWindowInformationMemory().isFocusedInFront() ){
         if(!eventCountBoolean){
            if(!pause){
               escButton = false;
               pause = true;
               
               pauseTimer = System.nanoTime();
               lastTime = System.nanoTime();
               //remainder starts to pause || there will be no notes in here
            }
         }
      }*/
      
      
      
      if(GameEngine.INSTANCE.isSleeps() ){
         //deactivate all keys
         player.setLeft(false); player.setRight(false);
         player.setUp_objEnt(false);
         player.setKeepStanceButton(false); player.setJumpingButton(false);
         
         if(player.getDashLevel() != 0){player.setDashButton(false); player.setWasDashButton(false);}
         if(player.getStabLevel() != 0){player.setStabButton(false);}
         player.setThrowingButton(false);
         
         hudPause.setUpButton(false); hudPause.setDownButton(false);
         enterButton = false; escButton = false;
      }
   }
   private void playingState(){
      ////----objects on tileMap----////
      //player
      if(player != null){
         //System.out.println(player.getX() +" " + player.getY() );
         player.update();
         tilemap.setPosition(player, GameEngine.game_width, GameEngine.game_height);
         backTilemap.setPosition(player, GameEngine.game_width, GameEngine.game_height );
         
         //pitfall stage restrictions
         if(player.getY() > 1000){
            player.setPosition(player.getX(), 1000);//set position to y = 1000 for not always changing the variables
            if(!player.isDead() ){
               player.setHealth(0);
               player.setDead(true);
            }
         }
         
         if(arrowSignStatus == 1){
            long elapsed = (System.nanoTime() - arrowSignTimer) / 1000000;
            if(elapsed > 3000){
               arrowSignStatus = 2;
               ws1 = new WordSign(tilemap, WordSign.arrowSign, 0, this);
               ws1.getAnimation().setFrame(2);
               ws1.setPosition(530, 470);
               ws1.setFacingRight(true);
               environments.add(ws1);
               
               ws2 = new WordSign(tilemap, WordSign.arrowSign, 0, this);
               ws2.setPosition(470, 470);
               ws2.setFacingRight(false);
               environments.add(ws2);
            }
         }
         else if(arrowSignStatus == 3){
            arrowSignStatus = 0;
            if(ws1 != null && ws2 != null){
               environments.remove(ws1);
               environments.remove(ws2);
               ws1 = null; ws2 = null;
            }
         }
         
      }
      //teleport
      if(goalTeleport != null){goalTeleport.update();}
      //items
      if(items != null){
         for(int i = 0; i < items.size(); i++){
            item = items.get(i);
            item.update();
            
            hitByItems();
            if(player != null){player.checkAttackOnItems(item, itemThrows);}
            
            if(items.get(i).shouldRemove() ){items.remove(i); i--;}
            if(items.size() < 0){enemies.ensureCapacity(1);}
            if(i < 0){i = 0;}
         }
      }
      //enemy
      if(enemies != null){
         for(int i = 0; i < enemies.size(); i++){
            enemy = enemies.get(i);
            enemy.update();
            
            hitByEnemies();
            if(player != null){player.checkAttackOnEnemy(enemy, itemThrows);}
            
            if(enemy.isDead() ){
               if(!enemy.shouldRemove() ){enemy.setRemove(true);}
               if(tilemap != null){itemDropByEnemies(enemy);}//only init explosion
            }
            if(enemies.get(i).shouldRemove() ){enemies.remove(i);}
            if(enemies.size() < 0){enemies.ensureCapacity(1);}
            if(i < 0){i = 0;}
         }
      }
      //environment
      if(environments != null){
         for(int i = 0; i < environments.size(); i++){
            environment = environments.get(i);
            environment.update();
            
            if(player != null){//can we do this on environment destroyable method instead here?
               player.checkAttackOnEnvironments(environment, itemThrows);
            }
            
            if(environment instanceof Rock){
               if(( (Rock) environment).isBreakToPieces() ){//4 environment that can drop random items
                  
                  //drop the item or specific item
                  if(!environment.isDropSpecifiItem() ){itemDropByEnvironment(environment);}
                  else if(environment.isDropSpecifiItem() ){environment.dropSpecificItem_Droppable();} //this is another way to do this || use this can drop a rock
                  
                  //drop the rock splinter
                  dropRockSplinter(environment);
                  
                  ((Rock) environment).setBreakToPieces(false);
               }
            }
            
            if(environments.get(i).shouldRemove() ){environments.remove(i); i--;}
            if(environments.size() < 0){environments.ensureCapacity(1);}
            if(i < 0){i = 0;}
         }
      }
      
      
      ////----extra looks----////
      //background
      if(baseBG != null){baseBG.update();}
      if(frontBG != null){frontBG.update();}
      //addition
      if(explosions != null){
         for(int i = 0; i < explosions.size(); i++){
            explosions.get(i).update();
            
            if(explosions.size() > 200){//checking memory
               //int size = explosions.size();
               /*int capacity = 0;
               try {capacity = StaticStuff.getArrayList_Capacity(explosions);}
               catch (Exception e) {e.printStackTrace();}
               System.out.println("LevelA1.update() capacity explosion = " + capacity);*/
               
               explosions.trimToSize();
            }
            
            if(explosions.get(i).shouldRemove() ){explosions.remove(i);i--;}
            if(i < 0){i = 0;}
         }
      }
      if(particles != null){
         for(int i = 0; i < particles.size(); i++){
            particles.get(i).update();
            
            if(particles.size() > 400){//checking memory
               //int size = particles.size();
               /*int capacity = 0;
               try {capacity = StaticStuff.getArrayList_Capacity(particles);}
               catch (Exception e) {e.printStackTrace();}
               System.out.println("LevelA1.update() capacity particles = " + capacity);*/
               
               particles.trimToSize();
            }
            
            if(particles.get(i).shouldRemove() ){particles.remove(i); i--;}
            if(i < 0){i = 0;}
         }
      }
      if(glints != null){
         for(int i = 0; i < glints.size(); i++){
            glints.get(i).update();
            
            if(glints.size() > 500){
               //int size = glints.size();
               /*int capacity = 0;
               try {capacity = StaticStuff.getArrayList_Capacity(glints);}
               catch (Exception e) {e.printStackTrace();}
               System.out.println("LevelA1.update() glints = " + capacity);*/
               
               glints.trimToSize();
            }
            
            if(items.indexOf(flyingBottle) == -1){//if this index flyingBottle is null
               if(glints.get(i).getAnimatingStyle() == Glint.UNLIMITED_RESTRICTION){//the special cases
                  glints.get(i).setUnlimited_Restrictions(true);
               }
            }
            
            
            if(glints.get(i).shouldRemove() ){glints.remove(i); i--;}
            if(i < 0){i = 0;}
         }
      }
      //HUD
      if(hudParameter != null){hudParameter.update();}
      if(player != null){player.limitParameters();}
   }
   private void pauseState(){
      //for the sake of lost timings
      nowTime = System.nanoTime();
      deltaTime = nowTime - lastTime;
      lastTime = nowTime;
      
      if(hudPause != null){
         hudPause.update();
         
         //selection of HUD in pause mode
         if(hudPause.getCurrentChoice() == 0){//return to game
            if(enterButton){
               enterButton = false;
               if(pause){pause = false;}
               if(hudPause.getNoteModel() != HUD_pauseParameter.NO_NOTE){hudPause.setNoteModel(HUD_pauseParameter.NO_NOTE);}
            }
         }
         else if(hudPause.getCurrentChoice() == 1){//restarting the game
            if(enterButton){
               enterButton = false;
               //restart is really complicated (the start and the first trigger is from here [restart 1st trigger]) || can restart if the lives is 0
               //level restart systems (lv1 = cost 1-live and only can use once lv2 = no cost of lives and only can use once) (no!)
               if(!wasRestartEvent){
                  if(player.getLives() > 0){
                     if(player.getCondition() == StaticStuff.VULNERABLE){
                        if(!player.isHealingIncoming() || !player.isDash() ){triggerRestartEvent = true;}
                     }
                     //else if(player.getCondition() == StaticStuff.EVADE){hudPause.setNoteModel(HUD_pauseParameter.NOTE23_RESETNOTE_NOEVASION);}
                     else{hudPause.setNoteModel(HUD_pauseParameter.NOTE22_RESETNOTE_HEALTHYCONDITION);}
                  }
                  else if(player.getLives() == 0){hudPause.setNoteModel(HUD_pauseParameter.NOTE21_RESETNOTE_NOTENOUGH);}
               }
               else if(wasRestartEvent){hudPause.setNoteModel(HUD_pauseParameter.NOTE20_RESETNOTE_WAIT);}
            }
            
         }
         else if(hudPause.getCurrentChoice() == 2){//exit the game
            if(enterButton){enterButton = false; GameEngine.INSTANCE.stop(2);}
         }
         
      }
      
      timingFix();
   }
   private void timingFix(){
      //the hits are using time system so if pause is in demand it will not stop the time systems
      //not so massive if it fix the levela1
      if(player != null){//only the healing and hitting condition in this level
         //player.setHitTimer(System.nanoTime() ); << reset to normal
         if(player.getCondition() == StaticStuff.HIT){player.setHitTimer(player.getHitTimer() + deltaTime );}
         else if(player.getCondition() == StaticStuff.FLINCH){player.setFlinchTimer(player.getFlinchTimer() + deltaTime );}
         
         if(player.isHealingIncoming() ){//if healing
            player.setHealTimer(player.getHealTimer() + deltaTime);
         }
         
         if(player.isDash() ){//if dash
            player.setDashCooldownTimer(player.getDashCooldownTimer() + deltaTime);
         }
      }
      
      if(enemies != null){//enemy cant get hurt because its impossible to hit them
         for(int i = 0; i < enemies.size(); i++){
            enemy = enemies.get(i);
            if(enemy.getCondition() == StaticStuff.HIT || enemy.getCondition() == StaticStuff.HITKNIFE || enemy.getCondition() == StaticStuff.HITREPEL || enemy.getCondition() == StaticStuff.HITSPINNER){}
            else if(enemy.getCondition() == StaticStuff.FLINCH){}
            
            if(enemy instanceof Wrapper){
               if(((Wrapper) enemy).isDetected() ){}
               if(((Wrapper) enemy).isEffective() ){}
            }
         }
      }
      
      if(items != null){//there is no item drop that can vanish and pulses like in this level
         for(int i = 0; i < items.size(); i++){
            item = items.get(i);
            
            if(item instanceof Food){
               if(((Food) item).getModel() == Food.LIGHT_PULSE || ((Food)item).getModel() == Food.DARK_PULSE){}
            }
            
            if(item.isVanish() ){}//if item that can vanish for not immediately vanish or maybe we can differentiate this
            
         }
      }
      
      if(particles != null){//fix particles to live up to desired lives
         for(int i = 0; i < particles.size(); i++){
            particles.get(i).setLiveTimer(particles.get(i).getLiveTimer() + deltaTime );
         }
      }
      
   }
   
   //its 4 playingState() method || interaction method 4 array-list for each object
   private void hitByEnemies(){
      if(player != null){
         if(!player.isDead() ){
            if(player.intersects(enemy) ){
               if(enemy.getHealth() > 0){
                  //its just only slime in this level
                  if(enemy instanceof Slime){
                     if(player.getCondition() == StaticStuff.VULNERABLE){
                        if(player.getX() < enemy.getX() ){player.hitLevel1(1, StaticStuff.FLINCH, 2, 9, false, false, true); player.setFacingRight(true);}
                        else if(player.getX() > enemy.getX() ){player.hitLevel1(1, StaticStuff.FLINCH, 2, 9, false, true, true); player.setFacingRight(false);}
                        else if(player.getX() == enemy.getX() ){player.hitLevel1(1, StaticStuff.FLINCH, 5, 8, true, false, true);}
                     }
                  }
               }
            }
            else if(!player.intersects(enemy) ){}//not implemented yet 4 future
         }
      }
   }
   private void hitByItems(){
      //items 4 player
      if(player != null){
         if(!player.isDead() ){
            //set of food items
            if(item instanceof Food){
               if(((Food) item).getModel() == Food.VIAL1){//its maybe based on level
                  if(item.getObjectTouch() == player && item.isAffect() ){
                     player.setMana(player.getMana() + 3);
                     item.setAffect(false);
                  }
               }
               else if(((Food) item).getModel() == Food.VIAL2){//heal mana by 20% from maximum
                  if(item.getObjectTouch() == player && item.isAffect() ){
                     player.setMana(player.getMana() + player.getMaxMana() / 5);
                     item.setAffect(false);
                  }
               }
               else if(((Food) item).getModel() == Food.VIAL3){//this is only a test
                  if(item.getObjectTouch() == player && item.isAffect() ){
                     player.setHealth(player.getMaxHealth() );
                     player.setMana(player.getMaxMana() );
                     player.setItemThrowType(ThrowItem.heal);
                     item.setAffect(false);
                  }
               }
               
               //negative parameters
               else if(((Food) item).getModel() == Food.POISONVIAL1 ){
                  if(item.getObjectTouch() == player && item.isAffect() ){
                     //this the only level that poison vial is event item || so is not damage and flinch
                     if(player.getCondition() == StaticStuff.VULNERABLE){
                        if(player.getX() < item.getX() ){player.hitLevel2(1, StaticStuff.FLINCH, true, StaticStuff.FLINCHtoVULNERABLE, 2, 9, false, false, true); player.setFacingRight(true);}
                        else if(player.getX() > item.getX() ){player.hitLevel2(1, StaticStuff.FLINCH, true, StaticStuff.FLINCHtoVULNERABLE, 2, 9, false, true, true); player.setFacingRight(false);}
                        else if(player.getX() == item.getX() ){player.hitLevel1(1, StaticStuff.FLINCH, 5, 8, true, false, true);}
                     }
                     
                     if(!posionGet){posionGet = true;}

                     
                     Explosion expl = new Explosion(tilemap, item.getX(), item.getY(), Explosion.BLUE_EXP, randomGenerator.nextBoolean(), false, this);
                     expl.alphaSet(0.6f);
                     explosions.add(expl);
                     
                     item.setAffect(false);
                  }
               }
               
            }
            
            //landMine
            if(item instanceof LandMine){
               if(item.getObjectTouch() == player && item.isAffect() ){
                  
                  if(player.isFacingRight() ){player.hitLevel2(1, StaticStuff.FLINCH, true, StaticStuff.FLINCHtoVULNERABLE, 2, 9, false, false, true);}
                  else if(!player.isFacingRight() ){player.hitLevel2(1, StaticStuff.FLINCH, true, StaticStuff.FLINCHtoVULNERABLE, 2, 9, false, true, true);}
                  
                  //explode
                  Explosion expl = new Explosion(tilemap, item.getX(), item.getY(), Explosion.BLUE_EXP, randomGenerator.nextBoolean(), false, this);
                  expl.alphaSet(0.4f);
                  explosions.add(expl);
                  
                  //drop some rock splinter maybe
                  dropRockSplinter(item);
                  
                  item.setAffect(false);
               }
            }
            
            //collectible
            if(item instanceof Collectible){
               if(((Collectible) item).getModel() == Collectible.HEART){//next level maybe some enemy can collect this
                  if(item.getObjectTouch() == player && item.isAffect() ){
                     heartCount++;
                     //System.out.println("LevelA1.hitByItems() heart = " + heartCount);
                     item.setAffect(false);
                  }
               }
            }
            
         }
         
      }
      
   }
   //its 4 playingState() method || that is in update but it react like initialize
   private void itemDropByEnemies(Enemy enemy){
      //in this level there is no item drop from enemy because its impossible to defeat it 
      Explosion exp = new Explosion(tilemap, enemy.getX(), enemy.getY(), Explosion.GRAY_EXP, false, true, this);
      explosions.add(exp);
   }
   private void itemDropByEnvironment(Environment environment){
      //in this level there is no item drop because its impossible to attack environment 
      Explosion exp = new Explosion(tilemap, environment.getX(), environment.getY(), Explosion.GRAY_EXP, false, true, this);
      explosions.add(exp);
   }
   private void dropRockSplinter(ObjectEntity rockyObject){
      if(rockyObject instanceof Rock){
         Explosion exps = new Explosion(tilemap, rockyObject.getX(), rockyObject.getY(), Explosion.BLUE_EXP, randomGenerator.nextBoolean(), false, this);
         exps.alphaSet(0.5f);
         explosions.add(exps);
         
         switch(((Rock) rockyObject).getModel() ){
            case Rock.rockModel1 :
               item = new RockSplinter(tilemap, true, true, this, RockSplinter.MODEL[15], RockSplinter.MEDIUM);
               item.initSetMoveStyle_JumpsOutOnce(rockyObject.getX(), rockyObject.getY(), 0.1 * randomGenerator.nextDouble() , 10 + 1.7 * randomGenerator.nextDouble(), randomGenerator.nextBoolean(), false);
               item.initSetVanishParameters(true, 3000, true);
               items.add(item);
               
               item = new RockSplinter(tilemap, true, true, this, RockSplinter.MODEL[10], RockSplinter.MEDIUM);
               item.initSetMoveStyle_JumpsOutOnce(rockyObject.getX() - 10, rockyObject.getY() - rockyObject.getCHeight() /2 + randomGenerator.nextInt(rockyObject.getCHeight() ),
                     1.3 * randomGenerator.nextDouble() , 10 + 1.7 * randomGenerator.nextDouble(), false, false);
               item.initSetVanishParameters(true, 3000, true);
               items.add(item);
               
               item = new RockSplinter(tilemap, true, true, this, RockSplinter.MODEL[10], RockSplinter.MEDIUM);
               item.initSetMoveStyle_JumpsOutOnce(rockyObject.getX() + 10, rockyObject.getY() - rockyObject.getCHeight() /2 + randomGenerator.nextInt(rockyObject.getCHeight() ),
                     1.3 * randomGenerator.nextDouble() , 10 + 1.7 * randomGenerator.nextDouble(), true, false);
               item.initSetVanishParameters(true, 3000, true);
               items.add(item);
               
               for(int i = 0; i < randomGenerator.nextInt(6) + 4; i ++){
                  int xAdds = rockyObject.getX() - (rockyObject.getCWidth() / 2)  + randomGenerator.nextInt(rockyObject.getCWidth() );
                  int yAdds = rockyObject.getY() - (rockyObject.getCHeight() / 2) + randomGenerator.nextInt(rockyObject.getCHeight() );
                  item = new RockSplinter(tilemap, false, true, this, RockSplinter.MODEL[10], RockSplinter.SMALL);
                  item.initSetMoveStyle_JumpsOutOnceAndUnclip(xAdds, yAdds,
                        1.6 * randomGenerator.nextDouble(), 10 + 1.7 * randomGenerator.nextDouble(), ((xAdds > rockyObject.getX() )? true : false), false);
                  item.initSetVanishParameters(true, 2000, true);
                  items.add(item);
               }
               break;
            case Rock.rockModel2 : 
               item = new RockSplinter(tilemap, true, true, this, RockSplinter.MODEL[10], RockSplinter.MEDIUM);
               item.initSetMoveStyle_JumpsOutOnce(rockyObject.getX(), rockyObject.getY() - 10, 0.1 * randomGenerator.nextDouble() , 10 + 1.7 * randomGenerator.nextDouble(), randomGenerator.nextBoolean(), false);
               item.initSetVanishParameters(true, 3000, true);
               items.add(item);
               
               item = new RockSplinter(tilemap, true, true, this, RockSplinter.MODEL[9], RockSplinter.MEDIUM);
               item.initSetMoveStyle_JumpsOutOnce(rockyObject.getX() - 10, rockyObject.getY() - rockyObject.getCHeight() /2 + randomGenerator.nextInt(rockyObject.getCHeight() ),
                     1.3 * randomGenerator.nextDouble() , 10 + 1.7 * randomGenerator.nextDouble(), false, false);
               item.initSetVanishParameters(true, 3000, true);
               items.add(item);
               
               item = new RockSplinter(tilemap, true, true, this, RockSplinter.MODEL[8], RockSplinter.MEDIUM);
               item.initSetMoveStyle_JumpsOutOnce(rockyObject.getX() + 10, rockyObject.getY() - rockyObject.getCHeight() /2 + randomGenerator.nextInt(rockyObject.getCHeight() ),
                     1.3 * randomGenerator.nextDouble() , 10 + 1.7 * randomGenerator.nextDouble(), true, false);
               item.initSetVanishParameters(true, 3000, true);
               items.add(item);
               
               for(int i = 0; i < randomGenerator.nextInt(16) + 1; i ++){
                  int xAdds = rockyObject.getX() - (rockyObject.getCWidth() / 2)  + randomGenerator.nextInt(rockyObject.getCWidth() );
                  int yAdds = rockyObject.getY() - (rockyObject.getCHeight() / 2) + randomGenerator.nextInt(rockyObject.getCHeight() );
                  item = new RockSplinter(tilemap, false, true, this, RockSplinter.MODEL[5], RockSplinter.SMALL);
                  item.initSetMoveStyle_JumpsOutOnceAndUnclip(xAdds, yAdds,
                        1.6 * randomGenerator.nextDouble(), 10 + 1.7 * randomGenerator.nextDouble(), ((xAdds > rockyObject.getX() )? true : false), false);
                  item.initSetVanishParameters(true, 2000, true);
                  items.add(item);
               }
               
               break;
            case Rock.rockModel3 :
               item = new RockSplinter(tilemap, true, true, this, RockSplinter.MODEL[6], RockSplinter.LARGE);
               item.initSetMoveStyle_JumpsOutOnce(rockyObject.getX(), rockyObject.getY() - 10, 0.1 * randomGenerator.nextDouble() , 10 + 1.7 * randomGenerator.nextDouble(), randomGenerator.nextBoolean(), false);
               item.initSetVanishParameters(true, 3000, true);
               items.add(item);
               
               item = new RockSplinter(tilemap, true, true, this, RockSplinter.MODEL[5], RockSplinter.MEDIUM);
               item.initSetMoveStyle_JumpsOutOnce(rockyObject.getX() - 10, rockyObject.getY() - rockyObject.getCHeight() /2 + randomGenerator.nextInt(rockyObject.getCHeight() ),
                     1.3 * randomGenerator.nextDouble() , 10 + 1.7 * randomGenerator.nextDouble(), false, false);
               item.initSetVanishParameters(true, 3000, true);
               items.add(item);
               
               item = new RockSplinter(tilemap, true, true, this, RockSplinter.MODEL[3], RockSplinter.LARGE);
               item.initSetMoveStyle_JumpsOutOnce(rockyObject.getX() + 10, rockyObject.getY() - rockyObject.getCHeight() /2 + randomGenerator.nextInt(rockyObject.getCHeight() ),
                     1.3 * randomGenerator.nextDouble() , 10 + 1.7 * randomGenerator.nextDouble(), true, false);
               item.initSetVanishParameters(true, 3000, true);
               items.add(item);
               
               for(int i = 0; i < randomGenerator.nextInt(12) + 2; i ++){
                  int xAdds = rockyObject.getX() - (rockyObject.getCWidth() / 2)  + randomGenerator.nextInt(rockyObject.getCWidth() );
                  int yAdds = rockyObject.getY() - (rockyObject.getCHeight() / 2) + randomGenerator.nextInt(rockyObject.getCHeight() );
                  item = new RockSplinter(tilemap, false, true, this, RockSplinter.MODEL[5], RockSplinter.SMALL);
                  item.initSetMoveStyle_JumpsOutOnceAndUnclip(xAdds, yAdds,
                        1.6 * randomGenerator.nextDouble(), 10 + 1.7 * randomGenerator.nextDouble(), ((xAdds > rockyObject.getX() )? true : false), false);
                  item.initSetVanishParameters(true, 2000, true);
                  items.add(item);
               }
               
               break;
            case Rock.rockModel4 : 
               item = new RockSplinter(tilemap, true, true, this, RockSplinter.MODEL[15], RockSplinter.MEDIUM);
               item.initSetMoveStyle_JumpsOutOnce(rockyObject.getX(), rockyObject.getY() - 10, 0.1 * randomGenerator.nextDouble() , 10 + 1.7 * randomGenerator.nextDouble(), randomGenerator.nextBoolean(), false);
               item.initSetVanishParameters(true, 3000, true);
               items.add(item);
               
               item = new RockSplinter(tilemap, true, true, this, RockSplinter.MODEL[11], RockSplinter.MEDIUM);
               item.initSetMoveStyle_JumpsOutOnce(rockyObject.getX() - 10, rockyObject.getY() - rockyObject.getCHeight() /2 + randomGenerator.nextInt(rockyObject.getCHeight() ),
                     1.3 * randomGenerator.nextDouble() , 10 + 1.7 * randomGenerator.nextDouble(), false, false);
               item.initSetVanishParameters(true, 3000, true);
               items.add(item);
               
               item = new RockSplinter(tilemap, true, true, this, RockSplinter.MODEL[11], RockSplinter.MEDIUM);
               item.initSetMoveStyle_JumpsOutOnce(rockyObject.getX() + 10, rockyObject.getY() - rockyObject.getCHeight() /2 + randomGenerator.nextInt(rockyObject.getCHeight() ),
                     1.3 * randomGenerator.nextDouble() , 10 + 1.7 * randomGenerator.nextDouble(), true, false);
               item.initSetVanishParameters(true, 3000, true);
               items.add(item);
               
               for(int i = 0; i < randomGenerator.nextInt(6) + 6; i ++){
                  int xAdds = rockyObject.getX() - (rockyObject.getCWidth() / 2)  + randomGenerator.nextInt(rockyObject.getCWidth() );
                  int yAdds = rockyObject.getY() - (rockyObject.getCHeight() / 2) + randomGenerator.nextInt(rockyObject.getCHeight() );
                  item = new RockSplinter(tilemap, false, true, this, RockSplinter.MODEL[5], RockSplinter.SMALL);
                  item.initSetMoveStyle_JumpsOutOnceAndUnclip(xAdds, yAdds,
                        1.6 * randomGenerator.nextDouble(), 10 + 1.7 * randomGenerator.nextDouble(), ((xAdds > rockyObject.getX() )? true : false), false);
                  item.initSetVanishParameters(true, 2000, true);
                  items.add(item);
               }
               
               break;
            case Rock.rockModel5 : 
               item = new RockSplinter(tilemap, true, true, this, RockSplinter.MODEL[12], RockSplinter.MEDIUM);
               item.initSetMoveStyle_JumpsOutOnce(rockyObject.getX(), rockyObject.getY() - 10, 0.1 * randomGenerator.nextDouble() , 10 + 1.7 * randomGenerator.nextDouble(), randomGenerator.nextBoolean(), false);
               item.initSetVanishParameters(true, 3000, true);
               items.add(item);
               
               item = new RockSplinter(tilemap, true, true, this, RockSplinter.MODEL[7], RockSplinter.MEDIUM);
               item.initSetMoveStyle_JumpsOutOnce(rockyObject.getX() - 10, rockyObject.getY() - rockyObject.getCHeight() /2 + randomGenerator.nextInt(rockyObject.getCHeight() ),
                     1.3 * randomGenerator.nextDouble() , 10 + 1.7 * randomGenerator.nextDouble(), false, false);
               item.initSetVanishParameters(true, 3000, true);
               items.add(item);
               
               item = new RockSplinter(tilemap, true, true, this, RockSplinter.MODEL[7], RockSplinter.MEDIUM);
               item.initSetMoveStyle_JumpsOutOnce(rockyObject.getX() + 10, rockyObject.getY() - rockyObject.getCHeight() /2 + randomGenerator.nextInt(rockyObject.getCHeight() ),
                     1.3 * randomGenerator.nextDouble() , 10 + 1.7 * randomGenerator.nextDouble(), true, false);
               item.initSetVanishParameters(true, 3000, true);
               items.add(item);
               
               for(int i = 0; i < randomGenerator.nextInt(10) + 10; i ++){
                  int xAdds = rockyObject.getX() - (rockyObject.getCWidth() / 2)  + randomGenerator.nextInt(rockyObject.getCWidth() );
                  int yAdds = rockyObject.getY() - (rockyObject.getCHeight() / 2) + randomGenerator.nextInt(rockyObject.getCHeight() );
                  int randomRocks = randomGenerator.nextInt(15) + 1;
                  item = new RockSplinter(tilemap, false, true, this, RockSplinter.MODEL[randomRocks], RockSplinter.SMALL);
                  item.initSetMoveStyle_JumpsOutOnceAndUnclip(xAdds, yAdds,
                        1.6 * randomGenerator.nextDouble(), 10 + 1.7 * randomGenerator.nextDouble(), ((xAdds > rockyObject.getX() )? true : false), false);
                  item.initSetVanishParameters(true, 2000, true);
                  items.add(item);
               }
               
               break;
         }
      }
      else if(rockyObject instanceof LandMine){
         for(int i = 0; i < randomGenerator.nextInt(12) + 2; i ++){
            int xAdds = rockyObject.getX() - (rockyObject.getCWidth() / 2)  + randomGenerator.nextInt(rockyObject.getCWidth() );
            int yAdds = rockyObject.getY() - (rockyObject.getCHeight() / 2) + randomGenerator.nextInt(rockyObject.getCHeight() );
            item = new RockSplinter(tilemap, false, true, this, RockSplinter.MODEL[5], RockSplinter.SMALL);
            item.initSetMoveStyle_JumpsOutOnceAndUnclip(xAdds, yAdds,
                  1.6 * randomGenerator.nextDouble(), 10 + 1.7 * randomGenerator.nextDouble(), ((xAdds > rockyObject.getX() )? true : false), false);
            item.initSetVanishParameters(true, 2000, true);
            items.add(item);
         }
      }
   }
   
   
   
   
   ////----events----////
   //cores
   @Override protected void eventTrigger() {
      if(!wasStartEvent){//start event
         if(!startEvent){
            if(triggerStartEvent){
               startEvent = true;
               eventCountBoolean = true;
            }
         }
      }
      if(!wasFinishEvent){//finish teleport event
         if(!finishEvent){
            if(player != null && goalTeleport != null){
               if(goalTeleport.contain(player) ){
                  finishEvent = true;
                  eventCountBoolean = true;
               }
            }
         }
      }
      
      if(!wasRestartEvent){//restart event
         if(!restartEvent){
            if(triggerRestartEvent){
               triggerRestartEvent = false;
               restartEvent = true;
               eventCountBoolean = true;
            }
         }
      }
      
      if(!wasDeadEvent){//dead event
         if(!deadEvent){
            if(player.isDead() ){
               deadEvent = true;
               eventCountBoolean = true;
            }
         }
      }
      
      if(!wasReliveEvent){//reLive event
         if(!reliveEvent){
            if(triggerReliveEvent){
               triggerReliveEvent = false;
               reliveEvent = true;
               eventCountBoolean = true;
            }
         }
      }
      
   }
   @Override protected void eventManager() {
      if(!wasStartEvent){//something unexpected
         if(startEvent){eventStart(normalWelcome);}
      }
      if(!wasFinishEvent){
         if(finishEvent){eventFinish();}
      }
      
      if(!wasRestartEvent){
         if(restartEvent){eventRestart();}
      }
      
      if(!wasDeadEvent){
         if(deadEvent){eventDead(this);}
      }
      
      //a heavy-size relive event
      if(!wasReliveEvent){
         if(reliveEvent){eventRelive();}
      }
      else if(wasReliveEvent){//the unexpected
         if(resetSomeEvents){
            resetSomeEvents = false;
            eventAfterRelive();//this will resetBack events
         }
      }
      
   }
   @Override protected void eventActive() {}
   //type of events
   @Override protected void eventStart(int eventModel){
      super.eventStart(eventModel);
      for(int i = 0; i < 60; i++){
         if(eventCount == i){
            switch(i){
            case 3 : case 7 : case 13 : case 19 : case 29 : case 37 : case 43 : case 51 : case 57 : 
               glint = new Glint(tilemap, Glint.whiteGlint1, this);
               if(items.indexOf(flyingBottle) != -1){
                  glint.initSetAnimatingStyle_UNLIMITED_RESTRICTION(
                        items.get(items.indexOf(flyingBottle) ).getX() - items.get(items.indexOf(flyingBottle) ).getCWidth()/ 2 + randomGenerator.nextInt(items.get(items.indexOf(flyingBottle) ).getCWidth() ),
                        items.get(items.indexOf(flyingBottle) ).getY() + items.get(items.indexOf(flyingBottle) ).getCWidth()/4 + randomGenerator.nextInt(items.get(items.indexOf(flyingBottle) ).getCWidth()/4 ),
                        false);
               }
               else{glint.initSetAnimatingStyle_UNLIMITED_RESTRICTION(500 + randomGenerator.nextInt(50), 100 + randomGenerator.nextInt(50), false);}//error level
               glints.add(glint);
               break;
            }
         }
      }
      
   }
   @Override protected void eventFinish(){
      super.eventFinish();
      if(clearParameterChanges && eventCount != 1){
         clearParameterChanges = false;
         
         GameEngine.mainMemory.getPlayerParameters(player);
         GameEngine.mainMemory.heartCount += heartCount;
         
         if(!GameEngine.mainMemory.levela[0]){GameEngine.mainMemory.levela[0] = true;}
      }
      
      if(changeState && eventCount != 270){
         //it might be possible to go to gem room its only once
         
         GameEngine.INSTANCE.setBlackScreenBoolean(true);
         if(!posionGet){stateManager.goNewStateAndRemovePrevious(new EventA1toA2(stateManager, false) );}
         else if(posionGet){stateManager.goNewStateAndRemovePrevious(new EventA1toA2(stateManager, true) );}//go to the new room
         
         changeState = false;
      }
   }
   @Override protected void eventDead(State prevState){//the event dead that continue to next event not to menu screens
      if(eventCountBoolean){eventCount++;}
      
      if(player.getLives() != 0){//enough lives to continue
         if(eventCount == 1){
            //init boxes
            rectangleBoxes.clear();
            alpha1 = 0;
            blackScreen_Tick1 = true;
            blackScreen_Render1 = true;
            rectangleBoxes.add(new Rectangle(0, 0, GameEngine.game_width, GameEngine.game_height ) );
            
            blockKeyInput = true;
            blockCoreInput = true;//only 4 levelA3
            player.setCondition(StaticStuff.EVENT);
            player.stopAllAction();
         }
         
         if(eventCount == 60){//cue the screen fades
            eventCountBoolean = false;
            if(blackScreen_Tick1){
               alpha1+=2;
               if(alpha1 > 255){
                  alpha1 = 255;
                  eventCountBoolean = true;
                  blackScreen_Tick1 = false;
               }
            }
            
         }
         
         if(eventCount == 90){
            destroyAll = true;
            
            enemies.clear();
            items.clear();
            environments.clear();
         }
         
         if(eventCount == 120){

            
            if(wasRestartEvent){wasRestartEvent = false;}//set back to false if it is wasRestartEvent is activated
            
            triggerReliveEvent = true;
            
            
            deadEvent = false; wasDeadEvent = true;
            eventCount = 0; eventCountBoolean = false;
         }
      }
      else if(player.getLives() <= 0){//not enough lives to continue
         if(eventCount == 1){
            //init boxes
            rectangleBoxes.clear();
            alpha1 = 0;
            blackScreen_Render1 = true;
            rectangleBoxes.add(new Rectangle(0, 0, GameEngine.game_width, GameEngine.game_height ) );
            
            blockKeyInput = true;
            blockCoreInput = true;
            player.stopAllAction();
         }
         
         if(eventCount == 90){alpha1 = 255;}
         
         if(eventCount == 180){
            //cue gameOver here || cue other gameover screens
            
            //stateManager.setState("menu");
            //stateManager.goNewStateAndRemovePrevious(new MenuState(GameEngine.INSTANCE, stateManager, MenuState.DEAD_START) );
            //maybe we need differentiate from 1st start and dead start
            if(!GameEngine.INSTANCE.isBlackScreenBoolean() ){GameEngine.INSTANCE.setBlackScreenBoolean(true);GameEngine.INSTANCE.setAlphaBlackScreen(1f);}
            stateManager.goNewStateAndRemovePrevious(new GameOver_A1(stateManager) );
            
            if(wasRestartEvent){wasRestartEvent = false;}//set back to false if it is wasRestartEvent is activated
            
            deadEvent = false; wasDeadEvent = true;
            eventCount = 0; eventCountBoolean = false;
         }
      }
   }
   @Override protected void eventRelive(){
      super.eventRelive();
      
      //add the glints again || that must be added in here
      for(int i = 0; i < 60; i++){
         if(eventCount == i){
            switch(i){
            case 3 : case 7 : case 13 : case 19 : case 29 : case 37 : case 43 : case 51 : case 57 : 
               glint = new Glint(tilemap, Glint.whiteGlint1, this);
               if(items.indexOf(flyingBottle) != -1){
                  glint.initSetAnimatingStyle_UNLIMITED_RESTRICTION(
                        items.get(items.indexOf(flyingBottle) ).getX() - items.get(items.indexOf(flyingBottle) ).getCWidth()/ 2 + randomGenerator.nextInt(items.get(items.indexOf(flyingBottle) ).getCWidth() ),
                        items.get(items.indexOf(flyingBottle) ).getY() + items.get(items.indexOf(flyingBottle) ).getCWidth()/4 + randomGenerator.nextInt(items.get(items.indexOf(flyingBottle) ).getCWidth()/4 ),
                        false);
               }
               else{glint.initSetAnimatingStyle_UNLIMITED_RESTRICTION(500 + randomGenerator.nextInt(50), 100 + randomGenerator.nextInt(50), false);}//error level
               glints.add(glint);
               break;
            }
         }
      }
      
      if(parameterReset && eventCount != 1){
         parameterReset = false;
         parameterResetBack();
      }
   }
   protected void parameterResetBack(){
      //do we need to clear arrayList parameter here?
      //this before blackScreen fading-up || so we reposition to where the safe place is 
      
      //parameter reposition, reStance and changes
      player.setLives(player.getLives() - 1);//minus health
      player.setPosition(500, 520);//some level if we get checkPoints will relive in the checkpoints not in the beginning
      player.setFacingRight(true);
      
      //if game paused from restarting event
      if(pause){pause = false;}
      if(renderAfterPauseScreen){renderAfterPauseScreen = false;}
      
      /*
      //parameter reset back
      if(player.getCondition() == StaticStuff.EVENT){player.setCondition(StaticStuff.VULNERABLE);}
      if(player.isDead() ){//if it is from dead event
         player.setHealth(3);
         player.setMana(8);
         player.setDead(false);
         player.setStatusNow(Player.good);
         player.setCondition(StaticStuff.VULNERABLE);
      }
      */
      if(!player.isDead() ){//if it is from restart event
         player.setHealth(3);
         player.setMana(8);
      }
      
      
      //some items, enemies, or environment maybe cant respawn
      if(enemies != null){addEnemies();}
      if(items != null){addItems();}
      if(environments != null){addEnvironments();}
      
      //auto-set the camera
      tilemap.setX(GameEngine.game_width / 2 - player.getX() );
      tilemap.setY(GameEngine.game_height / 2 - player.getY() );
   }
   protected void eventAfterRelive(){
      //player parameter resets
      
      //set up player || if we do this in here its making an effect rise from dead in checkPoints position
      if(player.getCondition() == StaticStuff.EVENT){player.setCondition(StaticStuff.VULNERABLE);}
      if(player.isDead() ){//if it is from dead event
         player.setHealth(3);
         player.setMana(8);
         player.setDead(false);
      }
      /*
      else if(!player.isDead() ){//if it is from restart event
         player.setHealth(3);
         player.setMana(8);
      }
      */
      
      ////----events----//// this event is just 4 reseting back to normal
      wasDeadEvent = false; deadEvent = false;//dead event(from superclass)
      wasReliveEvent = false; reliveEvent = false;//relive event (after done this relive event)
   }
   
   
   
   //key input 
   @Override public void keyPressed(KeyEvent e) {
      int k = e.getKeyCode();
      
      if(player != null && !player.isDead() ){//when player is not dead & not null
         if(!blockKeyInput){//some of event is going on
            //this natural button doesnt pause and can get stuck
            if(k == KeyEvent.VK_LEFT){
               player.setLeft(true);
               if(arrowSignStatus == 2){arrowSignStatus = 3;}
               else if(arrowSignStatus == 1){arrowSignStatus = 0;}
            }
            if(k == KeyEvent.VK_RIGHT) {
               player.setRight(true);
               if(arrowSignStatus == 2){arrowSignStatus = 3;}
               else if(arrowSignStatus == 1){arrowSignStatus = 0;}
            }
            if(k == KeyEvent.VK_UP) player.setUp_objEnt(true);
            if(k == KeyEvent.VK_DOWN) player.setKeepStanceButton(true);
            if(k == KeyEvent.VK_W) {
               player.setJumpingButton(true);
               if(arrowSignStatus == 2){arrowSignStatus = 3;}
               else if(arrowSignStatus == 1){arrowSignStatus = 0;}
            }
            
            if(!player.isActioning() ){

               if(e.getKeyCode() == KeyEvent.VK_E){
                  if(player.getDashLevel() != 0){
                     if(!player.wasDashButton() ){
                        if(!player.isDashButton() ){player.setDashButton(true);}
                     }
                  }
               }
               if(e.getKeyCode() == KeyEvent.VK_R){
                  if(player.getStabLevel() != 0){player.setStabButton(true);}
               }
               if(e.getKeyCode() == KeyEvent.VK_F){player.setThrowingButton(true);}
            }
            
            if(k == KeyEvent.VK_ESCAPE){escButton = true;}//player is checking the menu if u want to say it
         }
         
         if(!pause){
            //TODO instant
            if(!finishEvent){
               if(k == KeyEvent.VK_F1){player.setPosition(5700, 520); System.out.println("LevelA1.keyPressed() quick goal tele");}//end level
               if(k == KeyEvent.VK_F2){heartCount = 15; System.out.println("LevelA1.keyPressed() quick get heart");}
               if(k == KeyEvent.VK_F3){posionGet = true; System.out.println("LevelA1.keyPressed() quick condition gem clear");}
               if(k == KeyEvent.VK_F5){player.setHealth(player.getMaxHealth() ); player.setMana(player.getMaxMana() );}
               //player.setPosition(6000, 70);
               //posionGet = true;
               //player.setPosition(8000, 70);//secrets
               //player.setLives(0);//testing
            }
            
         }
         if(pause){
            if(!blockKeyInput){
               if(k == KeyEvent.VK_UP) {hudPause.setUpButton(true);}
               if(k == KeyEvent.VK_DOWN) {hudPause.setDownButton(true);}
               if(k == KeyEvent.VK_ENTER) {enterButton = true;}
               if(k == KeyEvent.VK_ESCAPE){escButton = true;}//this is usefull for closing the menu only
            }
         }
         
      }
      
   }
   @Override public void keyReleased(KeyEvent e) {
      int k = e.getKeyCode();
      if(player != null && !player.isDead() ){
         //this keyInput will still going on even it is paused
         if(!blockKeyInput){
            if(k == KeyEvent.VK_LEFT) player.setLeft(false);
            if(k == KeyEvent.VK_RIGHT) player.setRight(false);
            if(k == KeyEvent.VK_UP) player.setUp_objEnt(false);
            
            if(k == KeyEvent.VK_DOWN) player.setKeepStanceButton(false);
            if(k == KeyEvent.VK_W) player.setJumpingButton(false);
            
            if(e.getKeyCode() == KeyEvent.VK_E){
               if(player.getDashLevel() != 0){player.setWasDashButton(false);}
            }
         }
         if(!pause){}
         else if(pause){}
      }
   }
   
   
   //getter and setter
   public int getHeartCount() {return heartCount;}
   public boolean isPosionGet() {return posionGet;}
   
   public void setHeartCount(int heartCount) {this.heartCount = heartCount;}
   public void setPosionGet(boolean posionGet) {this.posionGet = posionGet;}
   
   
   //unused methods
   public void oldways(){
      if(escButton){
         escButton = false;
         pause = !pause;
         
         //this is after pause already change || so the init is flipped upside-down or vice-versa
         if(pause){//for init times if it is into pause || do we need pause timer? || this is upside-down
            pauseTimer = System.nanoTime();
            lastTime = System.nanoTime();
         }
         else if(!pause){
            if(hudPause != null){if(hudPause.getNoteModel() != HUD_pauseParameter.NO_NOTE){hudPause.setNoteModel(HUD_pauseParameter.NO_NOTE);} }
         }
      }
      else if(!GameEngine.INSTANCE.getWindowInformationMemory().isFocusedInFront() ){
         if(!eventCountBoolean){
            if(!pause){
               escButton = false;
               pause = true;
               
               pauseTimer = System.nanoTime();
               lastTime = System.nanoTime();
               //remainder starts to pause
            }
         }
      }
   }


   
   
}





Dump your java code here :



Special syntax:
  • To highlight a line (yellow background), prefix it with '@@'
  • To indicate that a line should be removed (red background), prefix it with '-'
  • To indicate that a line should be added (green background), prefix it with '+'
  • To post multiple snippets, seperate them by '~~~~'
  EOF
 
hadezbladez (276 views)
2018-11-16 13:46:03

hadezbladez (154 views)
2018-11-16 13:41:33

hadezbladez (286 views)
2018-11-16 13:35:35

hadezbladez (69 views)
2018-11-16 13:32:03

EgonOlsen (2124 views)
2018-06-10 19:43:48

EgonOlsen (2148 views)
2018-06-10 19:43:44

EgonOlsen (1361 views)
2018-06-10 19:43:20

DesertCoockie (1956 views)
2018-05-13 18:23:11

nelsongames (1598 views)
2018-04-24 18:15:36

nelsongames (2245 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!