Downloads containing FSPII8.j2as

Downloads
Name Author Game Mode Rating
JJ2 1.23 vanilla: Yamato CastleFeatured Download Violet CLM Single player 8 Download file

File preview

  1. uint CoinsFound = 0;
  2. bool onDrawScore(jjPLAYER@ play, jjCANVAS@ canvas) {
  3.         if (play.localPlayerID == 0) {
  4.                 const bool dark = CoinsFound < 20;
  5.                 canvas.drawSpriteFromCurFrame(14, 42, jjObjectPresets[OBJECT::SILVERCOIN].curFrame);
  6.                 canvas.drawString(10, 42, "1" + CoinsFound + "/20", STRING::SMALL,STRING::NORMAL,0, dark ? SPRITE::BRIGHTNESS : SPRITE::PALSHIFT, dark ? 96 : 208);
  7.                 if (!dark && !play.bossActivated)
  8.                         canvas.drawString(0x8000, jjSubscreenHeight - 49, "FIND   EXIT", STRING::MEDIUM, STRING::SPIN);
  9.         }
  10.         return false;
  11. }
  12. void onLevelLoad() {
  13.         jjObjectPresets[OBJECT::SILVERCOIN].behavior = PermanentCoin();
  14.         jjObjectPresets[OBJECT::SILVERCOIN].scriptedCollisions = true;
  15. }
  16. class PermanentCoin : jjBEHAVIORINTERFACE {
  17.         void onBehave(jjOBJ@ obj) {
  18.                 obj.behave(BEHAVIOR::PICKUP);
  19.         }
  20.         bool onObjectHit(jjOBJ@ obj, jjOBJ@ bullet, jjPLAYER@ player, int force) {
  21.                 jjEventSet(uint(obj.xOrg) >> 5, uint(obj.yOrg) >> 5, 0);
  22.                 obj.scriptedCollisions = false;
  23.                 player.objectHit(obj, force, HANDLING::PICKUP);
  24.                 CoinsFound += 1;
  25.                 return true;
  26.         }
  27. }
  28. void onPlayer(jjPLAYER@ play) {
  29.         play.coins = CoinsFound;
  30. }