Downloads containing xlmmonktree.j2as

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Monkey LakeFeatured Download Dragusela Battle 8.5 Download file

File preview

  1. const bool MLLESetupSuccessful = MLLE::Setup(); ///@MLLE-Generated
  2. #include "MLLE-Include-1.5.asc" ///@MLLE-Generated
  3. #pragma require "xlmmonktree-MLLE-Data-1.j2l" ///@MLLE-Generated
  4. #pragma require "xlmbeach1.j2t" ///@MLLE-Generated
  5. #pragma require "Jungle1_1.00g.j2t" ///@MLLE-Generated
  6. #pragma require "HauntedH1.j2t" ///@MLLE-Generated
  7. #pragma require "RollercoasterPark.j2t" ///@MLLE-Generated
  8. #pragma require "xlmmonktree.j2as" ///@MLLE-Generated
  9. void onLevelLoad() {
  10.   jjPIXELMAP rain(32,32);
  11.   for (uint x = 0; x < rain.width; ++x) {
  12.     for (uint y = 0; y < rain.height; ++y) {
  13.       if (x == 16) { //draw in the middle of the tile, xPixel 16
  14.         if (y <= 24) rain[x,y] = 75; //if at yPixel 24 or less, use color 75
  15.         else rain[x,y] = 74; //use color 74 for yPixels 25-32
  16.       } else {
  17.         rain[x,y] = 0;
  18.       }
  19.     }
  20.   }
  21.  
  22.   jjANIMATION@ anim = jjAnimations[jjAnimSets[ANIM::COMMON].firstAnim + 2];
  23.   for (uint frameID = 0; frameID < anim.frameCount; ++frameID) {
  24.     jjANIMFRAME@ frame = jjAnimFrames[anim.firstFrame + frameID];
  25.     rain.save(frame);
  26.     frame.hotSpotX = -frame.width/2;
  27.     frame.hotSpotY = -frame.height;
  28.   }
  29. }
  30.  
  31. void onPlayer(jjPLAYER@ play) {
  32.   for (int i = 0; i < 1024; i++) { //loop through the global array jjParticles[1024]
  33.     jjPARTICLE@ particle = jjParticles[i];
  34.     if (particle.type == PARTICLE::RAIN) {
  35.       particle.xSpeed = 0; //make rain fall straight down
  36.       particle.ySpeed = play.ySpeed < 0? 10 : int(10 + play.ySpeed); //the rain speed accounts for differences in the player speed, and so won't appear to fall more slowly when the player is falling
  37.     }
  38.   }
  39. }
  40. void onLevelReload() {
  41.   MLLE::Palette.apply();
  42. }
  43.  
  44.