Package com.pointcliki.dizgruntled

Examples of com.pointcliki.dizgruntled.Logic


   
    fMap.dispatcher().addMinion("newlogic", new Minion<IEvent>() {
      @Override
      public long run(Dispatcher<IEvent> dispatcher, String type, IEvent event) {
        if (event instanceof NewLogicEvent) {
          Logic l = ((NewLogicEvent) event).logic();
          fLogicLayer.addChild(l);
          l.init(fMap);
        }
        return Minion.CONTINUE;
      }
    });
   
View Full Code Here


         
          // For some reason, ambient files are sometimes incorrectly called "AREAXLOOP" rather than "AMBIENTXLOOP"
          if (GruntzGame.resourceManager().rez().file(aniRef, "ani") == null) aniRef = aniRef.replace("AREA", "AMBIENT");
         
          // Check that the string exists
          Logic log = factory.createFromWWD(logicRef, graphicRef, aniRef, Arrays.copyOfRange(s, dataOffset, dataOffset + 284));
          if (log != null) logics.add(log);
          else if (!logicRef.equals("GiantRock")) System.err.println("Failed to find controller for logic " + logicRef);
        }
      } catch (Exception e) {
        // Finish parsing errors if an exception occurs
View Full Code Here

        if (traits(xy).contains("redPyramid")) {
          // Check whether a logic has been placed here
          Effect e = gm.getFirstEntityOfTypeAt(xy, Effect.class);
          if (e == null) {
            try {
              Logic l = new Effect();
              JSONObject json = logic.exportToJSON();
              json.put("xy", (x * 32) + " " + (y * 32));
              l.importFromJSON(json);
              placeLogic(l);
            } catch (Exception e2) {
              System.err.println("Error creating virtual red pyramid logic at " + xy);
              System.err.println(e2.getMessage());
            }
View Full Code Here

TOP

Related Classes of com.pointcliki.dizgruntled.Logic

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.