diff --git a/Bee.java b/Bee.java index 352d57b..9147e1f 100755 --- a/Bee.java +++ b/Bee.java @@ -19,8 +19,7 @@ public void addedToWorld(World w) { @Override public void act() { - - attack(); + attack(dmg); collision(); super.act(); } diff --git a/Crown.java b/Crown.java index dea4494..cd8b8ce 100755 --- a/Crown.java +++ b/Crown.java @@ -1,19 +1,25 @@ -import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) +import greenfoot.GreenfootImage; /** * Write a description of class Crown here. - * - * @author (your name) + * + * @author (your name) * @version (a version number or a date) */ -public class Crown extends Collection -{ +public class Crown extends Collection { + private final GreenfootImage image; + + public Crown() { + image = new GreenfootImage("crown.png"); + image.scale(64, 64); + setImage(image); + } + /** * Act - do whatever the Crown wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ - public void act() - { + public void act() { if (isTouching(Player.class)){ getWorld().removeObject(this); Level.addCrown(); diff --git a/GameOverScreen.java b/GameOverScreen.java index b3a51ef..fd9bf96 100755 --- a/GameOverScreen.java +++ b/GameOverScreen.java @@ -1,53 +1,50 @@ -import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) +import greenfoot.*; /** * Write a description of class GameOverScreen here. - * - * @author (your name) + * + * @author (your name) * @version (a version number or a date) */ -public class GameOverScreen extends World -{ - private Font font = new Font("Arial", 64); - private SuperDisplayLabel titleLabel = new SuperDisplayLabel(Color.WHITE, Color.BLACK, font); - private GreenfootImage titleImage = new GreenfootImage("GameOverText.png"); - - private SuperDisplayLabel gameOverLabel = new SuperDisplayLabel(font); - private GreenfootImage gameOverImage = new GreenfootImage("gameOverInstructions.png"); - +public class GameOverScreen extends World { + private final Font font = new Font("Arial", 64); + private final SuperDisplayLabel titleLabel = new SuperDisplayLabel(Color.WHITE, Color.BLACK, font); + private final GreenfootImage titleImage = new GreenfootImage("GameOverText.png"); + + private final SuperDisplayLabel gameOverLabel = new SuperDisplayLabel(font); + private final GreenfootImage gameOverImage = new GreenfootImage("gameOverInstructions.png"); + /** * Constructor for objects of class GameOverScreen. - * */ - public GameOverScreen() - { + public GameOverScreen() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. - super(1280, 720, 1); - + super(1280, 720, 1); + // Background - setBackground("bricks.jpg"); - + setBackground("brick.jpg"); + // Title addObject(titleLabel, 600, 200); titleLabel.setImage(titleImage); - titleLabel.setLocation(640,150); - + titleLabel.setLocation(640, 150); + // Instruction Label - addObject(gameOverLabel,getWidth()/2, 600); + addObject(gameOverLabel, getWidth() / 2, 600); gameOverLabel.update("Press 'enter' to go to the Title Screen"); gameOverImage.scale(1100, 60); gameOverLabel.setImage(gameOverImage); - gameOverLabel.setLocation(getWidth()/2, 600); - - + gameOverLabel.setLocation(getWidth() / 2, 600); + + } - - public void act(){ + + public void act() { checkKeys(); } - - private void checkKeys(){ - if (Greenfoot.isKeyDown("enter")){ + + private void checkKeys() { + if (Greenfoot.isKeyDown("enter")) { TitleScreen title = new TitleScreen(); Greenfoot.setWorld(title); } diff --git a/Level.java b/Level.java index a5af246..b175eb9 100755 --- a/Level.java +++ b/Level.java @@ -22,6 +22,10 @@ public Level() { super(1280, 720, 1, false); } + public static void resetCoin() { + totalCoins = 0; + } + public static void addToTotalCoin() { totalCoins++; } @@ -54,6 +58,17 @@ public int[] getMapBoundary() { return mapBoundary; } + public void followPlayer(ImgScroll scr, Player p) { + if (p != null) { + scr.scroll(getWidth() / 2 - p.getX(), getHeight() / 2 - p.getY()); + } + } + + public void updateCoin(SuperDisplayLabel cl) { + cl.update("Coins: " + totalCoins); + cl.setLocation(getWidth() / 2, 20); + } + public int[][] loadLevel(int level) { ArrayList data = new ArrayList(); Scanner scan = null; @@ -94,6 +109,7 @@ public void spawnTerrain(int[][] identifier) { case 6 -> new RedBee(); case 7 -> new GreenBee(); case 8 -> new Spider(); + case 9 -> new Crown(); default -> null; }; if (a != null) { diff --git a/Level0.java b/Level0.java index cd9c384..e589fc3 100755 --- a/Level0.java +++ b/Level0.java @@ -9,7 +9,7 @@ public class Level0 extends Level { private final ImgScroll scroll; private final Player player; - private final int[] worldSize = {2560, 720}; + private final int[] worldSize = {7680, 720}; private Orb orb; /** @@ -22,16 +22,15 @@ public Level0() { spawnFloor(scroll); addObject(player = new Player(), 100, 622); addObject(coinLabel, 1100, 10); - coinLabel.update("Coins: " + totalCoins); + resetCoin(); int[][] blockGeneration = loadLevel(0); spawnTerrain(blockGeneration); } public void act() { - scroll.scroll(getWidth() / 2 - player.getX(), getHeight() / 2 - player.getY()); - coinLabel.update("Coins: " + totalCoins); - coinLabel.setLocation(getWidth() / 2, 20); + followPlayer(scroll, player); + updateCoin(coinLabel); checkNext(); } } diff --git a/Level1.java b/Level1.java index af08045..34c1226 100755 --- a/Level1.java +++ b/Level1.java @@ -22,7 +22,6 @@ public Level1() { spawnFloor(scroll); addObject(player = new Player(), 100, 622); addObject(coinLabel, 1100, 10); - coinLabel.update("Coins: " + totalCoins); // Individual Block Placement int[][] blockGeneration = new int[120][20]; @@ -31,8 +30,7 @@ public Level1() { } public void act() { - coinLabel.update("Coins: " + totalCoins); - coinLabel.setLocation(getWidth() / 2, 20); - scroll.scroll(getWidth() / 2 - player.getX(), getHeight() / 2 - player.getY()); + followPlayer(scroll, player); + updateCoin(coinLabel); } } diff --git a/Mites.java b/Mites.java index 37a6969..644cd29 100755 --- a/Mites.java +++ b/Mites.java @@ -31,6 +31,7 @@ public void act() { direction = bounceWall(direction, image); collision(); fall(); + attack(dmg); } private void fall() { diff --git a/Mobs.java b/Mobs.java index 7fa1519..040a648 100755 --- a/Mobs.java +++ b/Mobs.java @@ -115,7 +115,7 @@ public void stepped(){ getWorld().removeObject(this); } } - public void attack() { + public void attack(int dmg) { Player p = (Player) getOneIntersectingObject(Player.class); if (p == null) { return; diff --git a/Player.java b/Player.java index 8e38564..491d398 100755 --- a/Player.java +++ b/Player.java @@ -100,10 +100,9 @@ private void collision() { } private void checkHP() { - if (hp > 0) { - return; + if (hp < 0) { + Greenfoot.setWorld(new GameOverScreen()); } - w.removeObject(this); } public int getSpeed() { diff --git a/Spider.java b/Spider.java index b0f5487..9c3108b 100755 --- a/Spider.java +++ b/Spider.java @@ -33,7 +33,7 @@ public void act() { } else { movement(); } - attack(); + attack(dmg); timeout(); super.act(); } diff --git a/doc/Bee.html b/doc/Bee.html new file mode 100644 index 0000000..38535f9 --- /dev/null +++ b/doc/Bee.html @@ -0,0 +1,192 @@ + + + + +Bee (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Bee

+
+
java.lang.Object +
greenfoot.Actor + +
+
+
+
+
Direct Known Subclasses:
+
BlueBee, GreenBee, RedBee
+
+
+
public abstract class Bee +extends Mobs
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Bee

      +
      public Bee()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      addedToWorld

      +
      public void addedToWorld(greenfoot.World w)
      +
      +
      Overrides:
      +
      addedToWorld in class Mobs
      +
      +
      +
    • +
    • +
      +

      act

      +
      public void act()
      +
      +
      Overrides:
      +
      act in class greenfoot.Actor
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/BlueBee.html b/doc/BlueBee.html new file mode 100644 index 0000000..ac7fdca --- /dev/null +++ b/doc/BlueBee.html @@ -0,0 +1,190 @@ + + + + +BlueBee (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class BlueBee

+
+
java.lang.Object +
greenfoot.Actor +
SuperSmoothMover +
Mobs +
Bee +
BlueBee
+
+
+
+
+
+
+
+
public class BlueBee +extends Bee
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BlueBee

      +
      public BlueBee()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      addedToWorld

      +
      public void addedToWorld(greenfoot.World w)
      +
      +
      Overrides:
      +
      addedToWorld in class Bee
      +
      +
      +
    • +
    • +
      +

      act

      +
      public void act()
      +
      +
      Overrides:
      +
      act in class Bee
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/Brick.html b/doc/Brick.html new file mode 100644 index 0000000..9b63185 --- /dev/null +++ b/doc/Brick.html @@ -0,0 +1,178 @@ + + + + +Brick (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Brick

+
+
java.lang.Object +
greenfoot.Actor +
Tile +
Brick
+
+
+
+
+
+
public class Brick +extends Tile
+
Write a description of class Block here.
+
+
Version:
+
(a version number or a date)
+
Author:
+
(your name)
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    act()
    +
    +
    Act - do whatever the Block wants to do.
    +
    +
    +
    +
    +
    +

    Methods inherited from class greenfoot.Actor

    +addedToWorld, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getWorldOfType, getX, getY, intersects, isAtEdge, isTouching, move, removeTouching, setImage, setImage, setLocation, setRotation, sleepFor, turn, turnTowards
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Brick

      +
      public Brick()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      act

      +
      public void act()
      +
      Act - do whatever the Block wants to do. This method is called whenever + the 'Act' or 'Run' button gets pressed in the environment.
      +
      +
      Overrides:
      +
      act in class Tile
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/Button.html b/doc/Button.html new file mode 100644 index 0000000..2e0520b --- /dev/null +++ b/doc/Button.html @@ -0,0 +1,176 @@ + + + + +Button (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Button

+
+
java.lang.Object +
greenfoot.Actor +
Button
+
+
+
+
+
public class Button +extends greenfoot.Actor
+
Write a description of class Button here.
+
+
Version:
+
(a version number or a date)
+
Author:
+
(your name)
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    act()
    +
    +
    Act - do whatever the Button wants to do.
    +
    +
    +
    +
    +
    +

    Methods inherited from class greenfoot.Actor

    +addedToWorld, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getWorldOfType, getX, getY, intersects, isAtEdge, isTouching, move, removeTouching, setImage, setImage, setLocation, setRotation, sleepFor, turn, turnTowards
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Button

      +
      public Button()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      act

      +
      public void act()
      +
      Act - do whatever the Button wants to do. This method is called whenever + the 'Act' or 'Run' button gets pressed in the environment.
      +
      +
      Overrides:
      +
      act in class greenfoot.Actor
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/Coin.html b/doc/Coin.html new file mode 100644 index 0000000..7e90740 --- /dev/null +++ b/doc/Coin.html @@ -0,0 +1,183 @@ + + + + +Coin (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Coin

+
+
java.lang.Object +
greenfoot.Actor + +
+
+
+
+
public class Coin +extends Collection
+
Write a description of class Coin here.
+
+
Version:
+
(a version number or a date)
+
Author:
+
(your name)
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Coin

      +
      public Coin()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      act

      +
      public void act()
      +
      Act - do whatever the Coin wants to do. This method is called whenever + the 'Act' or 'Run' button gets pressed in the environment.
      +
      +
      Overrides:
      +
      act in class Collection
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/Collection.html b/doc/Collection.html new file mode 100644 index 0000000..33e64ed --- /dev/null +++ b/doc/Collection.html @@ -0,0 +1,185 @@ + + + + +Collection (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Collection

+
+
java.lang.Object +
greenfoot.Actor +
SuperSmoothMover +
Collection
+
+
+
+
+
+
Direct Known Subclasses:
+
Coin, Crown
+
+
+
public class Collection +extends SuperSmoothMover
+
Write a description of class Collection here.
+
+
Version:
+
(a version number or a date)
+
Author:
+
(your name)
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Collection

      +
      public Collection()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      act

      +
      public void act()
      +
      Act - do whatever the Collection wants to do. This method is called whenever + the 'Act' or 'Run' button gets pressed in the environment.
      +
      +
      Overrides:
      +
      act in class greenfoot.Actor
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/Crown.html b/doc/Crown.html new file mode 100644 index 0000000..f7612dc --- /dev/null +++ b/doc/Crown.html @@ -0,0 +1,183 @@ + + + + +Crown (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Crown

+
+
java.lang.Object +
greenfoot.Actor + +
+
+
+
+
public class Crown +extends Collection
+
Write a description of class Crown here.
+
+
Version:
+
(a version number or a date)
+
Author:
+
(your name)
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Crown

      +
      public Crown()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      act

      +
      public void act()
      +
      Act - do whatever the Crown wants to do. This method is called whenever + the 'Act' or 'Run' button gets pressed in the environment.
      +
      +
      Overrides:
      +
      act in class Collection
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/EndScreen.html b/doc/EndScreen.html new file mode 100644 index 0000000..55dd939 --- /dev/null +++ b/doc/EndScreen.html @@ -0,0 +1,140 @@ + + + + +EndScreen (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class EndScreen

+
+
java.lang.Object +
greenfoot.World +
EndScreen
+
+
+
+
+
public class EndScreen +extends greenfoot.World
+
Write a description of class EndScreen here.
+
+
Version:
+
(a version number or a date)
+
Author:
+
(your name)
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Constructor for objects of class EndScreen.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +

    Methods inherited from class greenfoot.World

    +act, addObject, getBackground, getCellSize, getColorAt, getHeight, getObjects, getObjectsAt, getWidth, numberOfObjects, removeObject, removeObjects, repaint, setActOrder, setBackground, setBackground, setPaintOrder, showText, started, stopped
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      EndScreen

      +
      public EndScreen()
      +
      Constructor for objects of class EndScreen.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/GameOverScreen.html b/doc/GameOverScreen.html new file mode 100644 index 0000000..e7c1442 --- /dev/null +++ b/doc/GameOverScreen.html @@ -0,0 +1,175 @@ + + + + +GameOverScreen (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class GameOverScreen

+
+
java.lang.Object +
greenfoot.World +
GameOverScreen
+
+
+
+
+
public class GameOverScreen +extends greenfoot.World
+
Write a description of class GameOverScreen here.
+
+
Version:
+
(a version number or a date)
+
Author:
+
(your name)
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Constructor for objects of class GameOverScreen.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    act()
    +
     
    +
    +
    +
    +
    +

    Methods inherited from class greenfoot.World

    +addObject, getBackground, getCellSize, getColorAt, getHeight, getObjects, getObjectsAt, getWidth, numberOfObjects, removeObject, removeObjects, repaint, setActOrder, setBackground, setBackground, setPaintOrder, showText, started, stopped
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      GameOverScreen

      +
      public GameOverScreen()
      +
      Constructor for objects of class GameOverScreen.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      act

      +
      public void act()
      +
      +
      Overrides:
      +
      act in class greenfoot.World
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/GreenBee.html b/doc/GreenBee.html new file mode 100644 index 0000000..53758de --- /dev/null +++ b/doc/GreenBee.html @@ -0,0 +1,145 @@ + + + + +GreenBee (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class GreenBee

+
+
java.lang.Object +
greenfoot.Actor +
SuperSmoothMover +
Mobs +
Bee +
GreenBee
+
+
+
+
+
+
+
+
public class GreenBee +extends Bee
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      GreenBee

      +
      public GreenBee()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/ImgScroll.html b/doc/ImgScroll.html new file mode 100644 index 0000000..f519bc1 --- /dev/null +++ b/doc/ImgScroll.html @@ -0,0 +1,266 @@ + + + + +ImgScroll (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class ImgScroll

+
+
java.lang.Object +
ImgScroll
+
+
+
+
public class ImgScroll +extends Object
+
CLASS: ImgScroll (subclass of Object)
+ AUTHOR: danpost (greenfoot.org username)
+ VERSION DATE: April 1, 2015
+
+ DESCRIPTION: a scrolling engine that scrolls the world given to the limits of the scrolling + background image given or to the dimensions given where the given background image is tiled, + if needed, to fill the scrolling area; keep in mind that the smaller the world window is, the + less lag you are likely to get (increasing the world size will cause an exponential increase + in possible lag); this class is designed to keep lag at a minimum by breaking the scrolling + background image into smaller parts so that the entire scrolling background image is not drawn + every time scrolling occurs;
+
+ There are two ways to create a scroller with this class:
+ (1) Use the two-parameter constructor to limit scrolling to the given background image dimensions;
+ (2) Use the four-parameter one to give the dimensions of the scrolling area and have the given + image tiled, if needed, to fill that area;
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    ImgScroll(greenfoot.World scrWorld, + greenfoot.GreenfootImage scrImage)
    +
    +
    calls the main constructor of the class using the dimensions of the given image for + the dimensions of the scrolling area
    +
    +
    ImgScroll(greenfoot.World scrWorld, + greenfoot.GreenfootImage repImage, + int wide, + int high)
    +
    +
    this main constructor sets field values and initial world background image
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    int
    + +
    +
    returns the overall amount scrolled horizontally
    +
    +
    int
    + +
    +
    returns the overall amount scrolled vertically
    +
    +
    int
    + +
    +
    returns the height of the scrolling area
    +
    +
    int
    + +
    +
    returns the width of the scrolling area
    +
    +
    void
    +
    scroll(int dx, + int dy)
    +
    +
    performs limited scrolling using the given changes in scroll values
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ImgScroll

      +
      public ImgScroll(greenfoot.World scrWorld, + greenfoot.GreenfootImage scrImage)
      +
      calls the main constructor of the class using the dimensions of the given image for + the dimensions of the scrolling area
      +
      +
      Parameters:
      +
      scrWorld - the world the given background image is to scroll in
      +
      scrImage - the scrolling background image to be used in the given world
      +
      +
      +
    • +
    • +
      +

      ImgScroll

      +
      public ImgScroll(greenfoot.World scrWorld, + greenfoot.GreenfootImage repImage, + int wide, + int high)
      +
      this main constructor sets field values and initial world background image
      +
      +
      Parameters:
      +
      scrWorld - the world the given background image is to scroll in
      +
      repImage - the image that is tiled to create the scrolling background image of the given world
      +
      wide - the horizontal dimension of the scrolling area
      +
      high - the vertical dimension of the scrolling area
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      scroll

      +
      public void scroll(int dx, + int dy)
      +
      performs limited scrolling using the given changes in scroll values
      +
      +
      Parameters:
      +
      dx - the amount to scroll horizontally (positive values scroll left moving view toward the right)
      +
      dy - the amount to scroll vertically (positive values scroll up moving view toward the bottom)
      +
      +
      +
    • +
    • +
      +

      getScrolledX

      +
      public int getScrolledX()
      +
      returns the overall amount scrolled horizontally
      +
      +
    • +
    • +
      +

      getScrolledY

      +
      public int getScrolledY()
      +
      returns the overall amount scrolled vertically
      +
      +
    • +
    • +
      +

      getScrollWidth

      +
      public int getScrollWidth()
      +
      returns the width of the scrolling area
      +
      +
    • +
    • +
      +

      getScrollHeight

      +
      public int getScrollHeight()
      +
      returns the height of the scrolling area
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/Level.html b/doc/Level.html new file mode 100644 index 0000000..9fdc600 --- /dev/null +++ b/doc/Level.html @@ -0,0 +1,291 @@ + + + + +Level (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Level

+
+
java.lang.Object +
greenfoot.World +
Level
+
+
+
+
+
Direct Known Subclasses:
+
Level0, Level1
+
+
+
public class Level +extends greenfoot.World
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    + + +
     
    +
    protected Player
    + +
     
    +
    protected ImgScroll
    + +
     
    +
    protected static int
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static void
    + +
     
    +
    void
    + +
     
    +
    void
    + +
     
    +
    int[]
    + +
     
    +
    int[]
    + +
     
    +
    int[][]
    +
    loadLevel(int level)
    +
     
    +
    void
    + +
     
    +
    void
    +
    spawnTerrain(int[][] identifier)
    +
    +
    NOTE - Use a 2d array of [40][10] for this to work as intended + Each value in the array represents 64x and 72y
    +
    +
    +
    +
    +
    +

    Methods inherited from class greenfoot.World

    +act, addObject, getBackground, getCellSize, getColorAt, getHeight, getObjects, getObjectsAt, getWidth, numberOfObjects, removeObject, removeObjects, repaint, setActOrder, setBackground, setBackground, setPaintOrder, showText, started, stopped
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      totalCoins

      +
      protected static int totalCoins
      +
      +
    • +
    • +
      +

      scroll

      +
      protected ImgScroll scroll
      +
      +
    • +
    • +
      +

      player

      +
      protected Player player
      +
      +
    • +
    • +
      +

      coinLabel

      +
      protected SuperDisplayLabel coinLabel
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Level

      +
      public Level()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      addToTotalCoin

      +
      public static void addToTotalCoin()
      +
      +
    • +
    • +
      +

      spawnFloor

      +
      public void spawnFloor(ImgScroll sc)
      +
      +
    • +
    • +
      +

      checkNext

      +
      public void checkNext()
      +
      +
    • +
    • +
      +

      getWorldSize

      +
      public int[] getWorldSize()
      +
      +
    • +
    • +
      +

      getMapBoundary

      +
      public int[] getMapBoundary()
      +
      +
    • +
    • +
      +

      followPlayer

      +
      public void followPlayer(ImgScroll scr, + Player p)
      +
      +
    • +
    • +
      +

      loadLevel

      +
      public int[][] loadLevel(int level)
      +
      +
    • +
    • +
      +

      spawnTerrain

      +
      public void spawnTerrain(int[][] identifier)
      +
      NOTE - Use a 2d array of [40][10] for this to work as intended + Each value in the array represents 64x and 72y
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/Level0.html b/doc/Level0.html new file mode 100644 index 0000000..65a7262 --- /dev/null +++ b/doc/Level0.html @@ -0,0 +1,189 @@ + + + + +Level0 (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Level0

+
+
java.lang.Object +
greenfoot.World +
Level +
Level0
+
+
+
+
+
+
public class Level0 +extends Level
+
Write a description of class Level0 here.
+
+
Version:
+
(a version number or a date)
+
Author:
+
(your name)
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Level0

      +
      public Level0()
      +
      Constructor for objects of class Level0.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      act

      +
      public void act()
      +
      +
      Overrides:
      +
      act in class greenfoot.World
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/Level1.html b/doc/Level1.html new file mode 100644 index 0000000..b977e26 --- /dev/null +++ b/doc/Level1.html @@ -0,0 +1,189 @@ + + + + +Level1 (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Level1

+
+
java.lang.Object +
greenfoot.World +
Level +
Level1
+
+
+
+
+
+
public class Level1 +extends Level
+
Write a description of class Level1 here.
+
+
Version:
+
(a version number or a date)
+
Author:
+
(your name)
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Level1

      +
      public Level1()
      +
      Constructor for objects of class Level1.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      act

      +
      public void act()
      +
      +
      Overrides:
      +
      act in class greenfoot.World
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/Mites.html b/doc/Mites.html new file mode 100644 index 0000000..e95cfdf --- /dev/null +++ b/doc/Mites.html @@ -0,0 +1,188 @@ + + + + +Mites (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Mites

+
+
java.lang.Object +
greenfoot.Actor + +
+
+
+
+
public class Mites +extends Mobs
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Mites

      +
      public Mites()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      addedToWorld

      +
      public void addedToWorld(greenfoot.World w)
      +
      +
      Overrides:
      +
      addedToWorld in class Mobs
      +
      +
      +
    • +
    • +
      +

      act

      +
      public void act()
      +
      +
      Overrides:
      +
      act in class greenfoot.Actor
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/Mobs.html b/doc/Mobs.html new file mode 100644 index 0000000..889d17d --- /dev/null +++ b/doc/Mobs.html @@ -0,0 +1,340 @@ + + + + +Mobs (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Mobs

+
+
java.lang.Object +
greenfoot.Actor + +
+
+
+
+
Direct Known Subclasses:
+
Bee, Mites, Spider
+
+
+
public abstract class Mobs +extends SuperSmoothMover
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      w

      +
      public greenfoot.World w
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Mobs

      +
      public Mobs()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      addedToWorld

      +
      public void addedToWorld(greenfoot.World w)
      +
      +
      Overrides:
      +
      addedToWorld in class greenfoot.Actor
      +
      +
      +
    • +
    • +
      +

      collision

      +
      public void collision()
      +
      +
    • +
    • +
      +

      bounceWall

      +
      protected int bounceWall(int dir)
      +
      +
    • +
    • +
      +

      bounceWall

      +
      protected int bounceWall(int dir, + greenfoot.GreenfootImage image)
      +
      +
    • +
    • +
      +

      idle

      +
      protected void idle()
      +
      +
    • +
    • +
      +

      getDistance

      +
      public double getDistance(Player p)
      +
      Get distance to a given Player + Inspired by Gevater_Tod4177 on greenfoot.org + ...
      +
      +
      Parameters:
      +
      p - Player
      +
      +
      +
    • +
    • +
      +

      getPlayer

      +
      public Player getPlayer(int range)
      +
      Get the Player + Inspired by Gevater_Tod4177 on greenfoot.org + ...
      +
      +
    • +
    • +
      +

      attack

      +
      public void attack(int damage)
      +
      +
    • +
    • +
      +

      changeHP

      +
      public void changeHP(int deltaHP)
      +
      +
    • +
    • +
      +

      changeSpeed

      +
      public void changeSpeed(int deltaSpeed)
      +
      +
    • +
    • +
      +

      getHP

      +
      public int getHP()
      +
      +
    • +
    • +
      +

      getSpeed

      +
      public int getSpeed()
      +
      +
    • +
    • +
      +

      setSpeed

      +
      public void setSpeed(int speed)
      +
      +
    • +
    • +
      +

      setSpeed

      +
      public void setSpeed(double multiplier)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/Orb.html b/doc/Orb.html new file mode 100644 index 0000000..a6f1f83 --- /dev/null +++ b/doc/Orb.html @@ -0,0 +1,185 @@ + + + + +Orb (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Orb

+
+
java.lang.Object +
greenfoot.Actor +
Orb
+
+
+
+
+
public class Orb +extends greenfoot.Actor
+
Write a description of class Orb here.
+
+
Version:
+
(a version number or a date)
+
Author:
+
(your name)
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    Orb()
    +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    act()
    +
    +
    Act - do whatever the Orb wants to do.
    +
    +
    boolean
    + +
     
    +
    +
    +
    +
    +

    Methods inherited from class greenfoot.Actor

    +addedToWorld, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getWorldOfType, getX, getY, intersects, isAtEdge, isTouching, move, removeTouching, setImage, setImage, setLocation, setRotation, sleepFor, turn, turnTowards
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Orb

      +
      public Orb()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      act

      +
      public void act()
      +
      Act - do whatever the Orb wants to do. This method is called whenever + the 'Act' or 'Run' button gets pressed in the environment.
      +
      +
      Overrides:
      +
      act in class greenfoot.Actor
      +
      +
      +
    • +
    • +
      +

      isBeingTouched

      +
      public boolean isBeingTouched()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/Player.html b/doc/Player.html index 24d765c..3e0b09e 100755 --- a/doc/Player.html +++ b/doc/Player.html @@ -1,26 +1,68 @@ - -Player + +Player (ArcaneOdyssey) - + + + + + +var pathtoroot = "./"; +loadScripts(document, 'script');
+
@@ -75,12 +117,21 @@

Method Summary

Act - do whatever the Player wants to do.
+
void
+
addedToWorld(greenfoot.World w)
+
 
+
void
+
changeHP(int deltaHP)
+
 
+
int
+ +
 

Methods inherited from class greenfoot.Actor

-addedToWorld, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getWorldOfType, getX, getY, intersects, isAtEdge, isTouching, move, removeTouching, setImage, setImage, setLocation, setRotation, sleepFor, turn, turnTowards
+getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getWorldOfType, getX, getY, intersects, isAtEdge, isTouching, move, removeTouching, setImage, setImage, setLocation, setRotation, sleepFor, turn, turnTowards

Methods inherited from class java.lang.Object

clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
@@ -110,6 +161,16 @@

Player

Method Details

diff --git a/doc/RedBee.html b/doc/RedBee.html new file mode 100644 index 0000000..9b7245f --- /dev/null +++ b/doc/RedBee.html @@ -0,0 +1,188 @@ + + + + +RedBee (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class RedBee

+
+
java.lang.Object +
greenfoot.Actor +
SuperSmoothMover +
Mobs +
Bee +
RedBee
+
+
+
+
+
+
+
+
public class RedBee +extends Bee
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      RedBee

      +
      public RedBee()
      +
      +
    • +
    • +
      +

      RedBee

      +
      public RedBee(int range)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      act

      +
      public void act()
      +
      +
      Overrides:
      +
      act in class Bee
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/Spider.html b/doc/Spider.html new file mode 100644 index 0000000..476f66c --- /dev/null +++ b/doc/Spider.html @@ -0,0 +1,215 @@ + + + + +Spider (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Spider

+
+
java.lang.Object +
greenfoot.Actor +
SuperSmoothMover +
Mobs +
Spider
+
+
+
+
+
+
+
public class Spider +extends Mobs
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Spider

      +
      public Spider()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      addedToWorld

      +
      public void addedToWorld(greenfoot.World w)
      +
      +
      Overrides:
      +
      addedToWorld in class Mobs
      +
      +
      +
    • +
    • +
      +

      act

      +
      public void act()
      +
      +
      Overrides:
      +
      act in class greenfoot.Actor
      +
      +
      +
    • +
    • +
      +

      movement

      +
      protected void movement()
      +
      +
    • +
    • +
      +

      hold

      +
      protected void hold()
      +
      +
    • +
    • +
      +

      timeout

      +
      public void timeout()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/SuperDisplayLabel.html b/doc/SuperDisplayLabel.html new file mode 100644 index 0000000..356d6b1 --- /dev/null +++ b/doc/SuperDisplayLabel.html @@ -0,0 +1,455 @@ + + + + +SuperDisplayLabel (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class SuperDisplayLabel

+
+
java.lang.Object +
greenfoot.Actor +
SuperDisplayLabel
+
+
+
+
+
public class SuperDisplayLabel +extends greenfoot.Actor
+

A useful label to display game score, stats, or other texts.

+ +

This is effectively a one-line text box that automatically fills the width of the World

+

Height can be specified directly, but otherwise is calculated based on the Font Size and the HEIGHT_RATIO -- for example + 20 point font with a HEIGHT_RATIO of 2.0 results in a height of 2.0 * 20 = 40 pixels

+

Version 1.2<.b>

+
    +
  • Improved API - more update methods for greater flexibility
  • +
  • More Constructors - for more customizability
  • +
  • Auto-width - now fits itself to the Width of the World (for other size, consider SuperTextBox instead)
  • +
  • Added constants for DEFAULTS
  • +
+
+
Since:
+
November 2015 (formerly ScoreBar)
+
Version:
+
1.2 (Jan 2023)
+
Author:
+
Jordan Cohen
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Simple constructor - Uses default fonts and colours and auto-height
    +
    +
    SuperDisplayLabel(greenfoot.Color backColor, + greenfoot.Color foreColor, + greenfoot.Font font)
    +
    +
    Font and Colour Choice Constructor
    +
    +
    SuperDisplayLabel(greenfoot.Color backColor, + greenfoot.Color foreColor, + greenfoot.Font font, + int height)
    +
    +
    The Detailed Constructor
    +
    +
    SuperDisplayLabel(greenfoot.Font font)
    +
    +
    Font Only Constructor.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    addedToWorld(greenfoot.World w)
    +
    +
    This is called automatically when the SuperDisplayLabel is added to the World.
    +
    +
    static void
    +
    drawCenteredText(greenfoot.GreenfootImage canvas, + String text, + int bottomY)
    +
    +
    + IMPORTANT: Set your Font in your GreenfootImage before you send it here.
    +
    +
    static void
    +
    drawCenteredText(greenfoot.GreenfootImage canvas, + String text, + int middleX, + int bottomY)
    +
    +
    Finally, draw centered text in Greenfoot!
    +
    +
    static int
    +
    getStringWidth(greenfoot.Font font, + String text)
    +
    +
    Mr.
    +
    +
    void
    +
    setLabels(String[] labels)
    +
    +
    Set labels without providing values.
    +
    +
    void
    + +
    +
    If you used this Display to show a String of text and want to go back to label: value style, use this method
    +
    +
    void
    +
    update(int[] newValues)
    +
    +
    Method to update the value shown on the TextBox.
    +
    +
    void
    +
    update(String output)
    +
    +
    Simplest Update method - used to display a centered String.
    +
    +
    void
    +
    update(String[] labels, + int[] newValues)
    +
    +
    Method to update the value shown on the score board.
    +
    +
    void
    +
    update(String output, + boolean recenter)
    +
    +
    Takes a String and displays it centered to the screen.
    +
    +
    +
    +
    +
    +

    Methods inherited from class greenfoot.Actor

    +act, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getWorldOfType, getX, getY, intersects, isAtEdge, isTouching, move, removeTouching, setImage, setImage, setLocation, setRotation, sleepFor, turn, turnTowards
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SuperDisplayLabel

      +
      public SuperDisplayLabel(greenfoot.Color backColor, + greenfoot.Color foreColor, + greenfoot.Font font, + int height)
      +
      The Detailed Constructor +

      This constructor presents the option to specifying a size. Ensure that the size is large enough to fit + the font otherwise this will not look right

      +
      +
    • +
    • +
      +

      SuperDisplayLabel

      +
      public SuperDisplayLabel(greenfoot.Color backColor, + greenfoot.Color foreColor, + greenfoot.Font font)
      +
      Font and Colour Choice Constructor +

      Note that the Font will be used to set the height when using this constructor

      +
      +
      Parameters:
      +
      backColor - the Background Colour
      +
      foreColor - the Text Colour
      +
      font - the Text Font, also used to calculate Height
      +
      +
      +
    • +
    • +
      +

      SuperDisplayLabel

      +
      public SuperDisplayLabel(greenfoot.Font font)
      +
      Font Only Constructor. +

      Note that the Font will be used to set the height when using this constructor

      +
      +
    • +
    • +
      +

      SuperDisplayLabel

      +
      public SuperDisplayLabel()
      +
      Simple constructor - Uses default fonts and colours and auto-height
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setLabels

      +
      public void setLabels(String[] labels)
      +
      Set labels without providing values.
      +
      +
      Parameters:
      +
      labels - a set of Strings to represent the stats to be shown
      +
      +
      +
    • +
    • +
      +

      addedToWorld

      +
      public void addedToWorld(greenfoot.World w)
      +
      This is called automatically when the SuperDisplayLabel is added to the World. + + Uses the size of the World to determine the width, and then draws itself and placed itself centered + and along the top edge.
      +
      +
      Overrides:
      +
      addedToWorld in class greenfoot.Actor
      +
      +
      +
    • +
    • +
      +

      update

      +
      public void update(String[] labels, + int[] newValues)
      +
      Method to update the value shown on the score board. The size of both arrays must be the same.
      +
      +
      Parameters:
      +
      labels - an array of Strings to label the various stats to be shown
      +
      newValues - an array of ints to show as values
      +
      +
      +
    • +
    • +
      +

      update

      +
      public void update(int[] newValues)
      +
      Method to update the value shown on the TextBox. Must be the same length as the labels array.
      +
      +
      Parameters:
      +
      newValues - an array of ints that is the same length as the labels that were set
      +
      +
      +
    • +
    • +
      +

      update

      +
      public void update()
      +
      If you used this Display to show a String of text and want to go back to label: value style, use this method
      +
      +
    • +
    • +
      +

      update

      +
      public void update(String output)
      +
      Simplest Update method - used to display a centered String.
      +
      +
      Parameters:
      +
      output - The String to be displayed in the center of this SuperDisplayLabel.
      +
      +
      +
    • +
    • +
      +

      update

      +
      public void update(String output, + boolean recenter)
      +
      Takes a String and displays it centered to the screen. Note this gets called by the other + update() method, but can also be called separate when you want to display a String rather + than a bunch of labels and values. This is the only method that actually updates the Image.
      +
      +
      Parameters:
      +
      output - A string to be output, centered on the screen.
      +
      recenter - if true, this will recalculate and center the text. Use this + sparingly, as the recalculation is fairly demanding on the CPU.
      +
      +
      +
    • +
    • +
      +

      drawCenteredText

      +
      public static void drawCenteredText(greenfoot.GreenfootImage canvas, + String text, + int middleX, + int bottomY)
      +

      Finally, draw centered text in Greenfoot!

      +

      + IMPORTANT: Set your Font in your GreenfootImage before you send it here. +

      +

      Use this instead of Greenfoot.drawString to center your text, or just call getStringWidth + directly and draw it yourself if you prefer the control over the ease of use.

      +
      +
      Parameters:
      +
      canvas - The GreenfootImage that you want to draw onto, often the background of a World, but + could also be an Actor's image or any other image.
      +
      text - The text to be drawn.
      +
      middleX - the x Coordinate that the text should be centered on
      +
      bottomY - the y Coordinate at the baseline of the text (similar to GreenfootImage.drawString)
      +
      Since:
      +
      June 2021
      +
      +
      +
    • +
    • +
      +

      drawCenteredText

      +
      public static void drawCenteredText(greenfoot.GreenfootImage canvas, + String text, + int bottomY)
      +

      + IMPORTANT: Set your Font in your GreenfootImage before you send it here. +

      +

      Similar to the method above, except it always centers the text on the whole image + instead of a specified x position. UNTESTED!

      +
      +
      Parameters:
      +
      canvas - The GreenfootImage that you want to draw onto, often the background of a World, but + could also be an Actor's image or any other image.
      +
      text - The text to be drawn.
      +
      bottomY - the y Coordinate at the baseline of the text (similar to GreenfootImage.drawString)
      +
      Since:
      +
      June 2021
      +
      +
      +
    • +
    • +
      +

      getStringWidth

      +
      public static int getStringWidth(greenfoot.Font font, + String text)
      +

      Mr. Cohen's Text Centering Algorithm

      + +

      Get the Width of a String, if it was printed out using the drawString command in a particular + Font.

      +

      There is a performance cost to this, although it is more significant on the Gallery, and + especially on the Gallery when browsed on a mobile device. It is appropriate to call this in the + constructor, and in most cases it is ideal NOT to call it from an act method, especially + every act.

      + +

      In cases where values are pre-determined, it may be ideal to cache the values (save them) so + you don't have to run this repeatedly on the same text. If you do this in the World constructor, + there is no performance cost while running.

      + +

      Performance & Compatibility:

      +
        +
      • Locally, performance should be sufficient on any moderate computer (average call 0.1-0.2ms on my laptop)
      • +
      • To be compatible with Greenfoot Gallery, removed use of getAwtImage() and replaced with getColorAt() on a GreenfootImage
      • +
      • On Gallery, performance is about 10x slower than locally (4ms on Gallery via Computer). For reference, an act() should be + less than 16.6ms to maintain 60 frames/acts per second.
      • +
      • HUGE performance drop on Gallery via Mobile devices - not sure why, going to ignore for now. (Average update duration 34ms, more + than 2 optimal acts)
      • +
      +
      +
      Parameters:
      +
      font - the GreenFoot.Font which is being used to draw text
      +
      text - the actual text to be drawn
      +
      Returns:
      +
      int the width of the String text as draw in Font font, in pixels.
      +
      Since:
      +
      June 2021
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/SuperSmoothMover.html b/doc/SuperSmoothMover.html new file mode 100644 index 0000000..8c8c0ea --- /dev/null +++ b/doc/SuperSmoothMover.html @@ -0,0 +1,571 @@ + + + + +SuperSmoothMover (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class SuperSmoothMover

+
+
java.lang.Object +
greenfoot.Actor +
SuperSmoothMover
+
+
+
+
+
Direct Known Subclasses:
+
Collection, Mobs
+
+
+
public abstract class SuperSmoothMover +extends greenfoot.Actor
+

A variation of an actor that maintains a precise location (using doubles for the co-ordinates + instead of ints). This allows small precise movements (e.g. movements of 1 pixel or less) + that do not lose precision.0 + + +

Modified by Jordan Cohen to include a precise rotation variable, as well as turn, setRotation + and turnTowards methods.

+ +

To use this class, simply have all of the Actors that need to move smoothly inherit from this + class. This class adds new versions of move, turn and setLocation which take doubles. It also adds the + following methods to access the precise values:

+
    +
  • getPreciseX, getPreciseY -> Retrieves precise values
  • +
  • getPreciseRotation -> gets the precise angle
  • +
  • turnTowards (Actor) -> an added bonus - turn towards another Actor instead of an xy position
  • +
+

Version 3.1 update - Now includes the option to enable static rotation, meaning the Actor will remain + facing the same direction visually even while turning and moving as desired. Call the method enableStaticRotation() + to try this out

+

Version 3.2 update (11/23) - Now includes the ability to rotate images manually for SuperSmoothMover objects + with staticRotation enabled. (Note that these new commands will do nothing if sR is disabled)

+

Version 1.24 update (1/24) - (Version numbers now match library version numbers) - Some performance optimizations via + caching common trig ratios and ensuring turnTowards can deal with trying to turn towards same pixel

+

Version 1.30 update (2/24) - Completed API, added some comments, cleaned up.

+
+
Version:
+
1.30.jc -- Modified by Jordan Cohen
+
Author:
+
Poul Henriksen, Michael Kolling, Neil Brown
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Default constructor - set staticRotation to false.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    This will turn off static rotation.
    +
    +
    void
    + +
    +
    Static rotation means that the IMAGE WILL NOT ROTATE.
    +
    +
    double
    + +
    +
    original name from SmoothMover, for compatibility.
    +
    +
    double
    + +
    +
    original name from SmoothMover, for compatibility.
    +
    +
    int
    + +
    +
    Get the current state of the image's rotation.
    +
    +
    double
    + +
    +
    Get the precise movement rotation of this Actor
    +
    +
    double
    + +
    +
    Return the exact x-coordinate (as a double).
    +
    +
    double
    + +
    +
    Return the exact y-coordinate (as a double).
    +
    +
    int
    + +
    +
    Get the rotation as an integer.
    +
    +
    void
    +
    move(double distance)
    +
    +
    Move forward by the specified exact distance.
    +
    +
    void
    +
    move(int distance)
    +
    +
    Move forward by the specified distance.
    +
    +
    void
    +
    rotateImage(int degrees)
    +
    +
    Rotate image, not movement facing angle
    +
    +
    void
    +
    setImageRotation(double rotation)
    +
    +
    Set the desired angle for the image.
    +
    +
    void
    +
    setImageRotation(int rotation)
    +
     
    +
    void
    +
    setLocation(double x, + double y)
    +
    +
    Set the location using exact coordinates.
    +
    +
    void
    +
    setLocation(int x, + int y)
    +
    +
    Set the location using integer coordinates.
    +
    +
    void
    +
    setRotation(double preciseRotation)
    +
    +
    Set the internal rotation value to a new value.
    +
    +
    void
    +
    setRotation(int angle)
    +
    +
    Set the internal rotation value to a new value.
    +
    +
    void
    +
    turn(double angle)
    +
    +
    Turn a specified number of degrees with precision.
    +
    +
    void
    +
    turn(int angle)
    +
    +
    Turn a specified number of degrees.
    +
    +
    void
    +
    turnImage(int degrees)
    +
    +
    Turn the IMAGE.
    +
    +
    void
    +
    turnTowards(int x, + int y)
    +
    +
    Set the internal rotation to face towards a given point.
    +
    +
    void
    +
    turnTowards(greenfoot.Actor a)
    +
    +
    A short-cut method that I (Jordan Cohen) always thought Greenfoot should have - use the + tuntToward method above to face another Actor instead of just a point.
    +
    +
    +
    +
    +
    +

    Methods inherited from class greenfoot.Actor

    +act, addedToWorld, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getWorld, getWorldOfType, getX, getY, intersects, isAtEdge, isTouching, removeTouching, setImage, setImage, sleepFor
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SuperSmoothMover

      +
      public SuperSmoothMover()
      +
      Default constructor - set staticRotation to false.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      move

      +
      public void move(int distance)
      +
      Move forward by the specified distance. + (Overrides the method in Actor).
      +
      +
      Overrides:
      +
      move in class greenfoot.Actor
      +
      Parameters:
      +
      distance - the distance to move in the current facing direction
      +
      +
      +
    • +
    • +
      +

      move

      +
      public void move(double distance)
      +
      Move forward by the specified exact distance.
      +
      +
      Parameters:
      +
      distance - the precise distance to move in the current facing direction
      +
      +
      +
    • +
    • +
      +

      enableStaticRotation

      +
      public void enableStaticRotation()
      +
      Static rotation means that the IMAGE WILL NOT ROTATE. The turn, turnTowards and move commands + will still work, and the Actor will move in the appropriate direction, but the image's facing angle + will not change. Note that the disableStaticRotation() method can be used to turn this off.
      +
      +
    • +
    • +
      +

      disableStaticRotation

      +
      public void disableStaticRotation()
      +
      This will turn off static rotation. Note that this will not do anything by default as static rotation + is disabled.
      +
      +
    • +
    • +
      +

      rotateImage

      +
      public void rotateImage(int degrees)
      +
      Rotate image, not movement facing angle +

      + Needs to be improved / added to.

      +
      +
    • +
    • +
      +

      turnTowards

      +
      public void turnTowards(int x, + int y)
      +
      Set the internal rotation to face towards a given point. This will override the method from Actor.
      +
      +
      Overrides:
      +
      turnTowards in class greenfoot.Actor
      +
      Parameters:
      +
      x - the x coordinate to face
      +
      y - the y coordinate to face
      +
      +
      +
    • +
    • +
      +

      turnTowards

      +
      public void turnTowards(greenfoot.Actor a)
      +
      A short-cut method that I (Jordan Cohen) always thought Greenfoot should have - use the + tuntToward method above to face another Actor instead of just a point. Keeps calling code + cleaner.
      +
      +
      Parameters:
      +
      a - The Actor to turn towards.
      +
      +
      +
    • +
    • +
      +

      turn

      +
      public void turn(int angle)
      +
      Turn a specified number of degrees.
      +
      +
      Overrides:
      +
      turn in class greenfoot.Actor
      +
      Parameters:
      +
      angle - the number of degrees to turn.
      +
      +
      +
    • +
    • +
      +

      turn

      +
      public void turn(double angle)
      +
      Turn a specified number of degrees with precision.
      +
      +
      Parameters:
      +
      angle - the precise number of degrees to turn
      +
      +
      +
    • +
    • +
      +

      setLocation

      +
      public void setLocation(double x, + double y)
      +
      Set the location using exact coordinates.
      +
      +
      Parameters:
      +
      x - the new x location
      +
      y - the new y location
      +
      +
      +
    • +
    • +
      +

      setLocation

      +
      public void setLocation(int x, + int y)
      +
      Set the location using integer coordinates. + (Overrides the method in Actor.)
      +
      +
      Overrides:
      +
      setLocation in class greenfoot.Actor
      +
      Parameters:
      +
      x - the new x location
      +
      y - the new y location
      +
      +
      +
    • +
    • +
      +

      getPreciseX

      +
      public double getPreciseX()
      +
      Return the exact x-coordinate (as a double).
      +
      +
      Returns:
      +
      double the exact x coordinate, as a double
      +
      +
      +
    • +
    • +
      +

      getExactX

      +
      public double getExactX()
      +
      original name from SmoothMover, for compatibility. Same as above.
      +
      +
      Returns:
      +
      double the exact x coordinate, as a double
      +
      +
      +
    • +
    • +
      +

      getPreciseY

      +
      public double getPreciseY()
      +
      Return the exact y-coordinate (as a double).
      +
      +
      Returns:
      +
      double the exact x coordinate, as a double
      +
      +
      +
    • +
    • +
      +

      exactY

      +
      public double exactY()
      +
      original name from SmoothMover, for compatibility. Same as above.
      +
      +
      Returns:
      +
      double the exact y coordinate, as a double
      +
      +
      +
    • +
    • +
      +

      turnImage

      +
      public void turnImage(int degrees)
      +
      Turn the IMAGE. This will not affect the movement rotation.
      +
      +
      Parameters:
      +
      degrees - The delta to be applied to the image's angle
      +
      +
      +
    • +
    • +
      +

      getPreciseRotation

      +
      public double getPreciseRotation()
      +
      Get the precise movement rotation of this Actor
      +
      +
      Returns:
      +
      double The precise rotation angle.
      +
      +
      +
    • +
    • +
      +

      getImageRotation

      +
      public int getImageRotation()
      +
      Get the current state of the image's rotation. If static rotation is + enabled, this will be different from the movement rotation, otherwise + it is the same (and you probably shouldn't be calling this method if + you are not using static rotation - use getRotation() or getPreciseRotation() + instead.)
      +
      +
      Returns:
      +
      int the current rotation of the image
      +
      +
      +
    • +
    • +
      +

      setImageRotation

      +
      public void setImageRotation(double rotation)
      +
      Set the desired angle for the image. Note that if static rotation is not\ + enabled, this method will do nothing.
      +
      +
    • +
    • +
      +

      setImageRotation

      +
      public void setImageRotation(int rotation)
      +
      +
    • +
    • +
      +

      getRotation

      +
      public int getRotation()
      +
      Get the rotation as an integer. If this is a precise value, + it will be rounded.
      +
      +
      Overrides:
      +
      getRotation in class greenfoot.Actor
      +
      Returns:
      +
      int The current angle, rounded to the nearest degree.
      +
      +
      +
    • +
    • +
      +

      setRotation

      +
      public void setRotation(double preciseRotation)
      +
      Set the internal rotation value to a new value.
      +
      +
      Parameters:
      +
      preciseRotation - the precise new angle
      +
      +
      +
    • +
    • +
      +

      setRotation

      +
      public void setRotation(int angle)
      +
      Set the internal rotation value to a new value. This will override the method from Actor.
      +
      +
      Overrides:
      +
      setRotation in class greenfoot.Actor
      +
      Parameters:
      +
      angle - the new angle
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/Tile.html b/doc/Tile.html new file mode 100644 index 0000000..73df1cf --- /dev/null +++ b/doc/Tile.html @@ -0,0 +1,180 @@ + + + + +Tile (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Tile

+
+
java.lang.Object +
greenfoot.Actor +
Tile
+
+
+
+
+
Direct Known Subclasses:
+
Brick
+
+
+
public class Tile +extends greenfoot.Actor
+
Write a description of class Tile here.
+
+
Version:
+
(a version number or a date)
+
Author:
+
(your name)
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    act()
    +
    +
    Act - do whatever the Tile wants to do.
    +
    +
    +
    +
    +
    +

    Methods inherited from class greenfoot.Actor

    +addedToWorld, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getWorldOfType, getX, getY, intersects, isAtEdge, isTouching, move, removeTouching, setImage, setImage, setLocation, setRotation, sleepFor, turn, turnTowards
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Tile

      +
      public Tile()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      act

      +
      public void act()
      +
      Act - do whatever the Tile wants to do. This method is called whenever + the 'Act' or 'Run' button gets pressed in the environment.
      +
      +
      Overrides:
      +
      act in class greenfoot.Actor
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/TitleScreen.html b/doc/TitleScreen.html new file mode 100644 index 0000000..07a30fe --- /dev/null +++ b/doc/TitleScreen.html @@ -0,0 +1,184 @@ + + + + +TitleScreen (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class TitleScreen

+
+
java.lang.Object +
greenfoot.World +
TitleScreen
+
+
+
+
+
public class TitleScreen +extends greenfoot.World
+
Write a description of class TitleScreen here.
+
+
Version:
+
(a version number or a date)
+
Author:
+
(your name)
+
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Constructor for objects of class TitleScreen.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    act()
    +
     
    +
    void
    + +
     
    +
    +
    +
    +
    +

    Methods inherited from class greenfoot.World

    +addObject, getBackground, getCellSize, getColorAt, getHeight, getObjects, getObjectsAt, getWidth, numberOfObjects, removeObject, removeObjects, repaint, setActOrder, setBackground, setBackground, setPaintOrder, showText, started, stopped
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TitleScreen

      +
      public TitleScreen()
      +
      Constructor for objects of class TitleScreen.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      act

      +
      public void act()
      +
      +
      Overrides:
      +
      act in class greenfoot.World
      +
      +
      +
    • +
    • +
      +

      checkPressed

      +
      public void checkPressed()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/allclasses-index.html b/doc/allclasses-index.html new file mode 100644 index 0000000..ad9033b --- /dev/null +++ b/doc/allclasses-index.html @@ -0,0 +1,159 @@ + + + + +All Classes and Interfaces (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+
+

All Classes and Interfaces

+
+
+
Classes
+
+
Class
+
Description
+ +
 
+ +
 
+ +
+
Write a description of class Block here.
+
+ +
+
Write a description of class Button here.
+
+ +
+
Write a description of class Coin here.
+
+ +
+
Write a description of class Collection here.
+
+ +
+
Write a description of class Crown here.
+
+ +
+
Write a description of class EndScreen here.
+
+ +
+
Write a description of class GameOverScreen here.
+
+ +
 
+ +
+
CLASS: ImgScroll (subclass of Object)
+ AUTHOR: danpost (greenfoot.org username)
+ VERSION DATE: April 1, 2015
+
+ DESCRIPTION: a scrolling engine that scrolls the world given to the limits of the scrolling + background image given or to the dimensions given where the given background image is tiled, + if needed, to fill the scrolling area; keep in mind that the smaller the world window is, the + less lag you are likely to get (increasing the world size will cause an exponential increase + in possible lag); this class is designed to keep lag at a minimum by breaking the scrolling + background image into smaller parts so that the entire scrolling background image is not drawn + every time scrolling occurs;
+
+ There are two ways to create a scroller with this class:
+ (1) Use the two-parameter constructor to limit scrolling to the given background image dimensions;
+ (2) Use the four-parameter one to give the dimensions of the scrolling area and have the given + image tiled, if needed, to fill that area;
+
+ +
 
+ +
+
Write a description of class Level0 here.
+
+ +
+
Write a description of class Level1 here.
+
+ +
 
+ +
 
+ +
+
Write a description of class Orb here.
+
+ +
+
Write a description of class Player here.
+
+ +
 
+ +
 
+ +
+
A useful label to display game score, stats, or other texts.
+
+ +
+
A variation of an actor that maintains a precise location (using doubles for the co-ordinates + instead of ints).
+
+ +
+
Write a description of class Tile here.
+
+ +
+
Write a description of class TitleScreen here.
+
+
+
+
+
+
+ + diff --git a/doc/allpackages-index.html b/doc/allpackages-index.html new file mode 100644 index 0000000..63134e0 --- /dev/null +++ b/doc/allpackages-index.html @@ -0,0 +1,63 @@ + + + + +All Packages (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+
+

All Packages

+
+
Package Summary
+
+
Package
+
Description
+ +
 
+
+
+
+
+ + diff --git a/doc/help-doc.html b/doc/help-doc.html new file mode 100644 index 0000000..baab489 --- /dev/null +++ b/doc/help-doc.html @@ -0,0 +1,170 @@ + + + + +API Help (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+

JavaDoc Help

+ +
+
+

Navigation

+Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces + +
+
+
+

Kinds of Pages

+The following sections describe the different kinds of pages in this collection. +
+

Package

+

Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:

+
    +
  • Interfaces
  • +
  • Classes
  • +
  • Enum Classes
  • +
  • Exceptions
  • +
  • Errors
  • +
  • Annotation Interfaces
  • +
+
+
+

Class or Interface

+

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.

+
    +
  • Class Inheritance Diagram
  • +
  • Direct Subclasses
  • +
  • All Known Subinterfaces
  • +
  • All Known Implementing Classes
  • +
  • Class or Interface Declaration
  • +
  • Class or Interface Description
  • +
+
+
    +
  • Nested Class Summary
  • +
  • Enum Constant Summary
  • +
  • Field Summary
  • +
  • Property Summary
  • +
  • Constructor Summary
  • +
  • Method Summary
  • +
  • Required Element Summary
  • +
  • Optional Element Summary
  • +
+
+
    +
  • Enum Constant Details
  • +
  • Field Details
  • +
  • Property Details
  • +
  • Constructor Details
  • +
  • Method Details
  • +
  • Element Details
  • +
+

Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.

+

The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

+
+
+

Other Files

+

Packages and modules may contain pages with additional information related to the declarations nearby.

+
+
+

Tree (Class Hierarchy)

+

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

+
    +
  • When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
  • +
  • When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
  • +
+
+
+

All Packages

+

The All Packages page contains an alphabetic index of all packages contained in the documentation.

+
+
+

All Classes and Interfaces

+

The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.

+
+
+

Index

+

The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.

+
+
+
+This help file applies to API documentation generated by the standard doclet.
+
+
+ + diff --git a/doc/index-all.html b/doc/index-all.html new file mode 100644 index 0000000..8ea48e6 --- /dev/null +++ b/doc/index-all.html @@ -0,0 +1,581 @@ + + + + +Index (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+A B C D E F G H I L M O P R S T U W 
All Classes and Interfaces|All Packages +

A

+
+
act() - Method in class Bee
+
 
+
act() - Method in class BlueBee
+
 
+
act() - Method in class Brick
+
+
Act - do whatever the Block wants to do.
+
+
act() - Method in class Button
+
+
Act - do whatever the Button wants to do.
+
+
act() - Method in class Coin
+
+
Act - do whatever the Coin wants to do.
+
+
act() - Method in class Collection
+
+
Act - do whatever the Collection wants to do.
+
+
act() - Method in class Crown
+
+
Act - do whatever the Crown wants to do.
+
+
act() - Method in class GameOverScreen
+
 
+
act() - Method in class Level0
+
 
+
act() - Method in class Level1
+
 
+
act() - Method in class Mites
+
 
+
act() - Method in class Orb
+
+
Act - do whatever the Orb wants to do.
+
+
act() - Method in class Player
+
+
Act - do whatever the Player wants to do.
+
+
act() - Method in class RedBee
+
 
+
act() - Method in class Spider
+
 
+
act() - Method in class Tile
+
+
Act - do whatever the Tile wants to do.
+
+
act() - Method in class TitleScreen
+
 
+
addedToWorld(World) - Method in class Bee
+
 
+
addedToWorld(World) - Method in class BlueBee
+
 
+
addedToWorld(World) - Method in class Mites
+
 
+
addedToWorld(World) - Method in class Mobs
+
 
+
addedToWorld(World) - Method in class Player
+
 
+
addedToWorld(World) - Method in class Spider
+
 
+
addedToWorld(World) - Method in class SuperDisplayLabel
+
+
This is called automatically when the SuperDisplayLabel is added to the World.
+
+
addToTotalCoin() - Static method in class Level
+
 
+
attack(int) - Method in class Mobs
+
 
+
+

B

+
+
Bee - Class in Unnamed Package
+
 
+
Bee() - Constructor for class Bee
+
 
+
BlueBee - Class in Unnamed Package
+
 
+
BlueBee() - Constructor for class BlueBee
+
 
+
bounceWall(int) - Method in class Mobs
+
 
+
bounceWall(int, GreenfootImage) - Method in class Mobs
+
 
+
Brick - Class in Unnamed Package
+
+
Write a description of class Block here.
+
+
Brick() - Constructor for class Brick
+
 
+
Button - Class in Unnamed Package
+
+
Write a description of class Button here.
+
+
Button() - Constructor for class Button
+
 
+
+

C

+
+
changeHP(int) - Method in class Mobs
+
 
+
changeHP(int) - Method in class Player
+
 
+
changeSpeed(int) - Method in class Mobs
+
 
+
checkNext() - Method in class Level
+
 
+
checkPressed() - Method in class TitleScreen
+
 
+
Coin - Class in Unnamed Package
+
+
Write a description of class Coin here.
+
+
Coin() - Constructor for class Coin
+
 
+
coinLabel - Variable in class Level
+
 
+
Collection - Class in Unnamed Package
+
+
Write a description of class Collection here.
+
+
Collection() - Constructor for class Collection
+
 
+
collision() - Method in class Mobs
+
 
+
Crown - Class in Unnamed Package
+
+
Write a description of class Crown here.
+
+
Crown() - Constructor for class Crown
+
 
+
+

D

+
+
disableStaticRotation() - Method in class SuperSmoothMover
+
+
This will turn off static rotation.
+
+
drawCenteredText(GreenfootImage, String, int) - Static method in class SuperDisplayLabel
+
+
+ IMPORTANT: Set your Font in your GreenfootImage before you send it here.
+
+
drawCenteredText(GreenfootImage, String, int, int) - Static method in class SuperDisplayLabel
+
+
Finally, draw centered text in Greenfoot!
+
+
+

E

+
+
enableStaticRotation() - Method in class SuperSmoothMover
+
+
Static rotation means that the IMAGE WILL NOT ROTATE.
+
+
EndScreen - Class in Unnamed Package
+
+
Write a description of class EndScreen here.
+
+
EndScreen() - Constructor for class EndScreen
+
+
Constructor for objects of class EndScreen.
+
+
exactY() - Method in class SuperSmoothMover
+
+
original name from SmoothMover, for compatibility.
+
+
+

F

+
+
followPlayer(ImgScroll, Player) - Method in class Level
+
 
+
+

G

+
+
GameOverScreen - Class in Unnamed Package
+
+
Write a description of class GameOverScreen here.
+
+
GameOverScreen() - Constructor for class GameOverScreen
+
+
Constructor for objects of class GameOverScreen.
+
+
getDistance(Player) - Method in class Mobs
+
+
Get distance to a given Player + Inspired by Gevater_Tod4177 on greenfoot.org + ...
+
+
getExactX() - Method in class SuperSmoothMover
+
+
original name from SmoothMover, for compatibility.
+
+
getHP() - Method in class Mobs
+
 
+
getImageRotation() - Method in class SuperSmoothMover
+
+
Get the current state of the image's rotation.
+
+
getMapBoundary() - Method in class Level
+
 
+
getPlayer(int) - Method in class Mobs
+
+
Get the Player + Inspired by Gevater_Tod4177 on greenfoot.org + ...
+
+
getPreciseRotation() - Method in class SuperSmoothMover
+
+
Get the precise movement rotation of this Actor
+
+
getPreciseX() - Method in class SuperSmoothMover
+
+
Return the exact x-coordinate (as a double).
+
+
getPreciseY() - Method in class SuperSmoothMover
+
+
Return the exact y-coordinate (as a double).
+
+
getRotation() - Method in class SuperSmoothMover
+
+
Get the rotation as an integer.
+
+
getScrolledX() - Method in class ImgScroll
+
+
returns the overall amount scrolled horizontally
+
+
getScrolledY() - Method in class ImgScroll
+
+
returns the overall amount scrolled vertically
+
+
getScrollHeight() - Method in class ImgScroll
+
+
returns the height of the scrolling area
+
+
getScrollWidth() - Method in class ImgScroll
+
+
returns the width of the scrolling area
+
+
getSpeed() - Method in class Mobs
+
 
+
getSpeed() - Method in class Player
+
 
+
getStringWidth(Font, String) - Static method in class SuperDisplayLabel
+
+
Mr.
+
+
getWorldSize() - Method in class Level
+
 
+
GreenBee - Class in Unnamed Package
+
 
+
GreenBee() - Constructor for class GreenBee
+
 
+
+

H

+
+
hold() - Method in class Spider
+
 
+
+

I

+
+
idle() - Method in class Mobs
+
 
+
ImgScroll - Class in Unnamed Package
+
+
CLASS: ImgScroll (subclass of Object)
+ AUTHOR: danpost (greenfoot.org username)
+ VERSION DATE: April 1, 2015
+
+ DESCRIPTION: a scrolling engine that scrolls the world given to the limits of the scrolling + background image given or to the dimensions given where the given background image is tiled, + if needed, to fill the scrolling area; keep in mind that the smaller the world window is, the + less lag you are likely to get (increasing the world size will cause an exponential increase + in possible lag); this class is designed to keep lag at a minimum by breaking the scrolling + background image into smaller parts so that the entire scrolling background image is not drawn + every time scrolling occurs;
+
+ There are two ways to create a scroller with this class:
+ (1) Use the two-parameter constructor to limit scrolling to the given background image dimensions;
+ (2) Use the four-parameter one to give the dimensions of the scrolling area and have the given + image tiled, if needed, to fill that area;
+
+
ImgScroll(World, GreenfootImage) - Constructor for class ImgScroll
+
+
calls the main constructor of the class using the dimensions of the given image for + the dimensions of the scrolling area
+
+
ImgScroll(World, GreenfootImage, int, int) - Constructor for class ImgScroll
+
+
this main constructor sets field values and initial world background image
+
+
isBeingTouched() - Method in class Orb
+
 
+
+

L

+
+
Level - Class in Unnamed Package
+
 
+
Level() - Constructor for class Level
+
 
+
Level0 - Class in Unnamed Package
+
+
Write a description of class Level0 here.
+
+
Level0() - Constructor for class Level0
+
+
Constructor for objects of class Level0.
+
+
Level1 - Class in Unnamed Package
+
+
Write a description of class Level1 here.
+
+
Level1() - Constructor for class Level1
+
+
Constructor for objects of class Level1.
+
+
loadLevel(int) - Method in class Level
+
 
+
+

M

+
+
Mites - Class in Unnamed Package
+
 
+
Mites() - Constructor for class Mites
+
 
+
Mobs - Class in Unnamed Package
+
 
+
Mobs() - Constructor for class Mobs
+
 
+
move(double) - Method in class SuperSmoothMover
+
+
Move forward by the specified exact distance.
+
+
move(int) - Method in class SuperSmoothMover
+
+
Move forward by the specified distance.
+
+
movement() - Method in class Spider
+
 
+
+

O

+
+
Orb - Class in Unnamed Package
+
+
Write a description of class Orb here.
+
+
Orb() - Constructor for class Orb
+
 
+
+

P

+
+
player - Variable in class Level
+
 
+
Player - Class in Unnamed Package
+
+
Write a description of class Player here.
+
+
Player() - Constructor for class Player
+
 
+
+

R

+
+
RedBee - Class in Unnamed Package
+
 
+
RedBee() - Constructor for class RedBee
+
 
+
RedBee(int) - Constructor for class RedBee
+
 
+
rotateImage(int) - Method in class SuperSmoothMover
+
+
Rotate image, not movement facing angle
+
+
+

S

+
+
scroll - Variable in class Level
+
 
+
scroll(int, int) - Method in class ImgScroll
+
+
performs limited scrolling using the given changes in scroll values
+
+
setImageRotation(double) - Method in class SuperSmoothMover
+
+
Set the desired angle for the image.
+
+
setImageRotation(int) - Method in class SuperSmoothMover
+
 
+
setLabels(String[]) - Method in class SuperDisplayLabel
+
+
Set labels without providing values.
+
+
setLocation(double, double) - Method in class SuperSmoothMover
+
+
Set the location using exact coordinates.
+
+
setLocation(int, int) - Method in class SuperSmoothMover
+
+
Set the location using integer coordinates.
+
+
setRotation(double) - Method in class SuperSmoothMover
+
+
Set the internal rotation value to a new value.
+
+
setRotation(int) - Method in class SuperSmoothMover
+
+
Set the internal rotation value to a new value.
+
+
setSpeed(double) - Method in class Mobs
+
 
+
setSpeed(int) - Method in class Mobs
+
 
+
spawnFloor(ImgScroll) - Method in class Level
+
 
+
spawnTerrain(int[][]) - Method in class Level
+
+
NOTE - Use a 2d array of [40][10] for this to work as intended + Each value in the array represents 64x and 72y
+
+
Spider - Class in Unnamed Package
+
 
+
Spider() - Constructor for class Spider
+
 
+
SuperDisplayLabel - Class in Unnamed Package
+
+
A useful label to display game score, stats, or other texts.
+
+
SuperDisplayLabel() - Constructor for class SuperDisplayLabel
+
+
Simple constructor - Uses default fonts and colours and auto-height
+
+
SuperDisplayLabel(Color, Color, Font) - Constructor for class SuperDisplayLabel
+
+
Font and Colour Choice Constructor
+
+
SuperDisplayLabel(Color, Color, Font, int) - Constructor for class SuperDisplayLabel
+
+
The Detailed Constructor
+
+
SuperDisplayLabel(Font) - Constructor for class SuperDisplayLabel
+
+
Font Only Constructor.
+
+
SuperSmoothMover - Class in Unnamed Package
+
+
A variation of an actor that maintains a precise location (using doubles for the co-ordinates + instead of ints).
+
+
SuperSmoothMover() - Constructor for class SuperSmoothMover
+
+
Default constructor - set staticRotation to false.
+
+
+

T

+
+
Tile - Class in Unnamed Package
+
+
Write a description of class Tile here.
+
+
Tile() - Constructor for class Tile
+
 
+
timeout() - Method in class Spider
+
 
+
TitleScreen - Class in Unnamed Package
+
+
Write a description of class TitleScreen here.
+
+
TitleScreen() - Constructor for class TitleScreen
+
+
Constructor for objects of class TitleScreen.
+
+
totalCoins - Static variable in class Level
+
 
+
turn(double) - Method in class SuperSmoothMover
+
+
Turn a specified number of degrees with precision.
+
+
turn(int) - Method in class SuperSmoothMover
+
+
Turn a specified number of degrees.
+
+
turnImage(int) - Method in class SuperSmoothMover
+
+
Turn the IMAGE.
+
+
turnTowards(int, int) - Method in class SuperSmoothMover
+
+
Set the internal rotation to face towards a given point.
+
+
turnTowards(Actor) - Method in class SuperSmoothMover
+
+
A short-cut method that I (Jordan Cohen) always thought Greenfoot should have - use the + tuntToward method above to face another Actor instead of just a point.
+
+
+

U

+
+
update() - Method in class SuperDisplayLabel
+
+
If you used this Display to show a String of text and want to go back to label: value style, use this method
+
+
update(int[]) - Method in class SuperDisplayLabel
+
+
Method to update the value shown on the TextBox.
+
+
update(String) - Method in class SuperDisplayLabel
+
+
Simplest Update method - used to display a centered String.
+
+
update(String[], int[]) - Method in class SuperDisplayLabel
+
+
Method to update the value shown on the score board.
+
+
update(String, boolean) - Method in class SuperDisplayLabel
+
+
Takes a String and displays it centered to the screen.
+
+
+

W

+
+
w - Variable in class Mobs
+
 
+
+A B C D E F G H I L M O P R S T U W 
All Classes and Interfaces|All Packages
+
+
+ + diff --git a/doc/index.html b/doc/index.html index 0a48009..51bb55f 100755 --- a/doc/index.html +++ b/doc/index.html @@ -1,18 +1,18 @@ - -Generated Documentation (Untitled) + +ArcaneOdyssey - + - + - + @@ -20,7 +20,7 @@ -

Player.html

+

ImgScroll.html

diff --git a/doc/jquery-ui.overrides.css b/doc/jquery-ui.overrides.css new file mode 100644 index 0000000..facf852 --- /dev/null +++ b/doc/jquery-ui.overrides.css @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + /* Overrides the color of selection used in jQuery UI */ + background: #F8981D; + border: 1px solid #F8981D; +} diff --git a/doc/logfile.txt b/doc/logfile.txt index b1ed0e5..9502557 100755 --- a/doc/logfile.txt +++ b/doc/logfile.txt @@ -1,35 +1,127 @@ -Class documentation +Project documentation <---- javadoc command: ----> -C:\Program Files\Greenfoot\jdk\bin\javadoc.exe --author --version --nodeprecated --protected --Xdoclint:none --noindex --notree --nohelp --nonavbar +javadoc +-sourcepath +/home/leo/Documents/School/ICS4U/ArcaneOdyssey -source 17 -classpath -C:\Program Files\Greenfoot\lib\greenfoot.jar;C:\Program Files\Greenfoot\lib\javafx-base-20.0.1-win.jar;C:\Program Files\Greenfoot\lib\javafx-base-20.0.1.jar;C:\Program Files\Greenfoot\lib\javafx-controls-20.0.1-win.jar;C:\Program Files\Greenfoot\lib\javafx-controls-20.0.1.jar;C:\Program Files\Greenfoot\lib\javafx-fxml-20.0.1-win.jar;C:\Program Files\Greenfoot\lib\javafx-graphics-20.0.1-win.jar;C:\Program Files\Greenfoot\lib\javafx-graphics-20.0.1.jar;C:\Program Files\Greenfoot\lib\javafx-media-20.0.1-win.jar;C:\Program Files\Greenfoot\lib\javafx-media-20.0.1.jar;C:\Program Files\Greenfoot\lib\javafx-swing-20.0.1-win.jar;C:\Program Files\Greenfoot\lib\javafx-web-20.0.1-win.jar;C:\Program Files\Greenfoot\lib\junit-4.12.jar;C:\Program Files\Greenfoot\lib\junit-jupiter-5.5.2.jar;C:\Program Files\Greenfoot\lib\junit-jupiter-api-5.5.2.jar;C:\Program Files\Greenfoot\lib\junit-jupiter-engine-5.5.2.jar;C:\Program Files\Greenfoot\lib\junit-jupiter-params-5.5.2.jar;C:\Program Files\Greenfoot\lib\junit-platform-commons-1.5.2.jar;C:\Program Files\Greenfoot\lib\junit-platform-engine-1.5.2.jar;C:\Program Files\Greenfoot\lib\junit-platform-launcher-1.5.2.jar;C:\Program Files\Greenfoot\lib\junit-platform-suite-api-1.5.2.jar;C:\Program Files\Greenfoot\lib\junit-vintage-engine-5.5.2.jar;C:\Program Files\Greenfoot\lib\hamcrest-core-1.3.jar;C:\Program Files\Greenfoot\lib\opentest4j-1.2.0.jar;C:\Program Files\Greenfoot\lib\bluej.jar;C:\Program Files\Greenfoot\lib\classgraph-4.8.90.jar;C:\Program Files\Greenfoot\lib\diffutils-1.2.1.jar;C:\Program Files\Greenfoot\lib\commons-logging-1.2.jar;C:\Program Files\Greenfoot\lib\jl1.0.1.jar;C:\Program Files\Greenfoot\lib\opencsv-2.3.jar;C:\Program Files\Greenfoot\lib\opencsv-2.4.jar;C:\Program Files\Greenfoot\lib\xom-1.3.7.jar;C:\Program Files\Greenfoot\lib\lang-stride.jar;C:\Program Files\Greenfoot\lib\nsmenufx-2.1.8.jar;C:\Program Files\Greenfoot\lib\wellbehavedfx-0.3.3.jar;C:\Program Files\Greenfoot\lib\guava-17.0.jar;C:\Program Files\Greenfoot\lib\simple-png-0.2.0.jar;C:\Program Files\Greenfoot\lib\simple-png-javafx-0.2.0.jar;C:\Program Files\Greenfoot\lib\httpclient-4.5.13.jar;C:\Program Files\Greenfoot\lib\httpcore-4.4.13.jar;C:\Program Files\Greenfoot\lib\httpmime-4.1.1.jar;C:\Program Files\Greenfoot\lib\javafx\javafx.base.jar;C:\Program Files\Greenfoot\lib\javafx\javafx.controls.jar;C:\Program Files\Greenfoot\lib\javafx\javafx.fxml.jar;C:\Program Files\Greenfoot\lib\javafx\javafx.graphics.jar;C:\Program Files\Greenfoot\lib\javafx\javafx.media.jar;C:\Program Files\Greenfoot\lib\javafx\javafx.properties.jar;C:\Program Files\Greenfoot\lib\javafx\javafx.swing.jar;C:\Program Files\Greenfoot\lib\javafx\javafx.web.jar;C:\Users\jimmy_p2fa2zj\Downloads\testertest +/app/greenfoot/lib/greenfoot.jar:/app/greenfoot/lib/junit-4.12.jar:/app/greenfoot/lib/junit-jupiter-5.5.2.jar:/app/greenfoot/lib/junit-jupiter-api-5.5.2.jar:/app/greenfoot/lib/junit-jupiter-engine-5.5.2.jar:/app/greenfoot/lib/junit-jupiter-params-5.5.2.jar:/app/greenfoot/lib/junit-platform-commons-1.5.2.jar:/app/greenfoot/lib/junit-platform-engine-1.5.2.jar:/app/greenfoot/lib/junit-platform-launcher-1.5.2.jar:/app/greenfoot/lib/junit-platform-suite-api-1.5.2.jar:/app/greenfoot/lib/junit-vintage-engine-5.5.2.jar:/app/greenfoot/lib/hamcrest-core-1.3.jar:/app/greenfoot/lib/opentest4j-1.2.0.jar:/app/greenfoot/lib/bluej.jar:/app/greenfoot/lib/classgraph-4.8.90.jar:/app/greenfoot/lib/diffutils-1.2.1.jar:/app/greenfoot/lib/commons-logging-1.2.jar:/app/greenfoot/lib/jl1.0.1.jar:/app/greenfoot/lib/opencsv-2.3.jar:/app/greenfoot/lib/opencsv-2.4.jar:/app/greenfoot/lib/xom-1.3.7.jar:/app/greenfoot/lib/lang-stride.jar:/app/greenfoot/lib/nsmenufx-2.1.8.jar:/app/greenfoot/lib/wellbehavedfx-0.3.3.jar:/app/greenfoot/lib/guava-17.0.jar:/app/greenfoot/lib/simple-png-0.2.0.jar:/app/greenfoot/lib/simple-png-javafx-0.2.0.jar:/app/greenfoot/lib/httpclient-4.5.13.jar:/app/greenfoot/lib/httpcore-4.4.13.jar:/app/greenfoot/lib/httpmime-4.1.1.jar:/app/javafx/lib/javafx.base.jar:/app/javafx/lib/javafx.controls.jar:/app/javafx/lib/javafx.fxml.jar:/app/javafx/lib/javafx.graphics.jar:/app/javafx/lib/javafx.media.jar:/app/javafx/lib/javafx.properties.jar:/app/javafx/lib/javafx.swing.jar:/app/javafx/lib/javafx.web.jar/lib/javafx.base.jar:/app/javafx/lib/javafx.base.jar:/app/javafx/lib/javafx.controls.jar:/app/javafx/lib/javafx.fxml.jar:/app/javafx/lib/javafx.graphics.jar:/app/javafx/lib/javafx.media.jar:/app/javafx/lib/javafx.properties.jar:/app/javafx/lib/javafx.swing.jar:/app/javafx/lib/javafx.web.jar/lib/javafx.controls.jar:/app/javafx/lib/javafx.base.jar:/app/javafx/lib/javafx.controls.jar:/app/javafx/lib/javafx.fxml.jar:/app/javafx/lib/javafx.graphics.jar:/app/javafx/lib/javafx.media.jar:/app/javafx/lib/javafx.properties.jar:/app/javafx/lib/javafx.swing.jar:/app/javafx/lib/javafx.web.jar/lib/javafx.fxml.jar:/app/javafx/lib/javafx.base.jar:/app/javafx/lib/javafx.controls.jar:/app/javafx/lib/javafx.fxml.jar:/app/javafx/lib/javafx.graphics.jar:/app/javafx/lib/javafx.media.jar:/app/javafx/lib/javafx.properties.jar:/app/javafx/lib/javafx.swing.jar:/app/javafx/lib/javafx.web.jar/lib/javafx.graphics.jar:/app/javafx/lib/javafx.base.jar:/app/javafx/lib/javafx.controls.jar:/app/javafx/lib/javafx.fxml.jar:/app/javafx/lib/javafx.graphics.jar:/app/javafx/lib/javafx.media.jar:/app/javafx/lib/javafx.properties.jar:/app/javafx/lib/javafx.swing.jar:/app/javafx/lib/javafx.web.jar/lib/javafx.media.jar:/app/javafx/lib/javafx.base.jar:/app/javafx/lib/javafx.controls.jar:/app/javafx/lib/javafx.fxml.jar:/app/javafx/lib/javafx.graphics.jar:/app/javafx/lib/javafx.media.jar:/app/javafx/lib/javafx.properties.jar:/app/javafx/lib/javafx.swing.jar:/app/javafx/lib/javafx.web.jar/lib/javafx.properties.jar:/app/javafx/lib/javafx.base.jar:/app/javafx/lib/javafx.controls.jar:/app/javafx/lib/javafx.fxml.jar:/app/javafx/lib/javafx.graphics.jar:/app/javafx/lib/javafx.media.jar:/app/javafx/lib/javafx.properties.jar:/app/javafx/lib/javafx.swing.jar:/app/javafx/lib/javafx.web.jar/lib/javafx.swing.jar:/app/javafx/lib/javafx.base.jar:/app/javafx/lib/javafx.controls.jar:/app/javafx/lib/javafx.fxml.jar:/app/javafx/lib/javafx.graphics.jar:/app/javafx/lib/javafx.media.jar:/app/javafx/lib/javafx.properties.jar:/app/javafx/lib/javafx.swing.jar:/app/javafx/lib/javafx.web.jar/lib/javafx.web.jar:/home/leo/Documents/School/ICS4U/ArcaneOdyssey -d -C:\Users\jimmy_p2fa2zj\Downloads\testertest\doc +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc -encoding UTF-8 -charset UTF-8 -C:\Users\jimmy_p2fa2zj\Downloads\testertest\Player.java +-doctitle +ArcaneOdyssey +-windowtitle +ArcaneOdyssey +-author +-version +-nodeprecated +-protected +-Xdoclint:none +-link +https://docs.oracle.com/en/java/javase/17/docs/api/ +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/ImgScroll.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/SuperSmoothMover.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/Mites.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/GreenBee.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/TitleScreen.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/Coin.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/Button.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/SuperDisplayLabel.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/Player.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/Bee.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/Tile.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/EndScreen.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/BlueBee.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/GameOverScreen.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/Crown.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/Brick.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/Mobs.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/Spider.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/Collection.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/RedBee.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/Level.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/Level0.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/Level1.java +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/Orb.java <---- end of javadoc command ----> -Loading source file C:\Users\jimmy_p2fa2zj\Downloads\testertest\Player.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/ImgScroll.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/SuperSmoothMover.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/Mites.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/GreenBee.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/TitleScreen.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/Coin.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/Button.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/SuperDisplayLabel.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/Player.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/Bee.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/Tile.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/EndScreen.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/BlueBee.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/GameOverScreen.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/Crown.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/Brick.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/Mobs.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/Spider.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/Collection.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/RedBee.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/Level.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/Level0.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/Level1.java... +Loading source file /home/leo/Documents/School/ICS4U/ArcaneOdyssey/Orb.java... Constructing Javadoc information... warning: unknown enum constant Tag.Any reason: class file for threadchecker.Tag not found warning: unknown enum constant Tag.Any -Standard Doclet version 17.0.4.1+1 +warning: unknown enum constant Tag.Any +warning: unknown enum constant Tag.Any +Building index for all the packages and classes... +Standard Doclet version 17.0.9+7 Building tree for all the packages and classes... -Generating C:\Users\jimmy_p2fa2zj\Downloads\testertest\doc\Player.html... -Generating C:\Users\jimmy_p2fa2zj\Downloads\testertest\doc\package-summary.html... -Generating C:\Users\jimmy_p2fa2zj\Downloads\testertest\doc\index.html... -2 warnings +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/Bee.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/BlueBee.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/Brick.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/Button.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/Coin.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/Collection.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/Crown.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/EndScreen.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/GameOverScreen.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/GreenBee.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/ImgScroll.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/Level.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/Level0.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/Level1.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/Mites.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/Mobs.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/Orb.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/Player.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/RedBee.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/Spider.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/SuperDisplayLabel.html... +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/SuperDisplayLabel.java:9: warning: invalid input: '<' + *

Version 1.2<.b>

+ ^ +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/SuperDisplayLabel.java:260: warning: invalid input: '&' + *

Performance & Compatibility:

+ ^ +/home/leo/Documents/School/ICS4U/ArcaneOdyssey/SuperDisplayLabel.java:275: warning: Tag @version cannot be used in method documentation. It can only be used in the following types of documentation: overview, module, package, class/interface. + * @version December 2021 - Even more Efficiency Improvement - sub 0.06ms per update on setSpeed(100)! + ^ +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/SuperSmoothMover.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/Tile.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/TitleScreen.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/package-summary.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/package-tree.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/overview-tree.html... +Building index for all classes... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/allclasses-index.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/allpackages-index.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/index-all.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/index.html... +Generating /home/leo/Documents/School/ICS4U/ArcaneOdyssey/doc/help-doc.html... +7 warnings diff --git a/doc/member-search-index.js b/doc/member-search-index.js new file mode 100644 index 0000000..170a8f9 --- /dev/null +++ b/doc/member-search-index.js @@ -0,0 +1 @@ +memberSearchIndex = [{"p":"","c":"Bee","l":"act()"},{"p":"","c":"BlueBee","l":"act()"},{"p":"","c":"Brick","l":"act()"},{"p":"","c":"Button","l":"act()"},{"p":"","c":"Coin","l":"act()"},{"p":"","c":"Collection","l":"act()"},{"p":"","c":"Crown","l":"act()"},{"p":"","c":"GameOverScreen","l":"act()"},{"p":"","c":"Level0","l":"act()"},{"p":"","c":"Level1","l":"act()"},{"p":"","c":"Mites","l":"act()"},{"p":"","c":"Orb","l":"act()"},{"p":"","c":"Player","l":"act()"},{"p":"","c":"RedBee","l":"act()"},{"p":"","c":"Spider","l":"act()"},{"p":"","c":"Tile","l":"act()"},{"p":"","c":"TitleScreen","l":"act()"},{"p":"","c":"Bee","l":"addedToWorld(World)","u":"addedToWorld(greenfoot.World)"},{"p":"","c":"BlueBee","l":"addedToWorld(World)","u":"addedToWorld(greenfoot.World)"},{"p":"","c":"Mites","l":"addedToWorld(World)","u":"addedToWorld(greenfoot.World)"},{"p":"","c":"Mobs","l":"addedToWorld(World)","u":"addedToWorld(greenfoot.World)"},{"p":"","c":"Player","l":"addedToWorld(World)","u":"addedToWorld(greenfoot.World)"},{"p":"","c":"Spider","l":"addedToWorld(World)","u":"addedToWorld(greenfoot.World)"},{"p":"","c":"SuperDisplayLabel","l":"addedToWorld(World)","u":"addedToWorld(greenfoot.World)"},{"p":"","c":"Level","l":"addToTotalCoin()"},{"p":"","c":"Mobs","l":"attack(int)"},{"p":"","c":"Bee","l":"Bee()","u":"%3Cinit%3E()"},{"p":"","c":"BlueBee","l":"BlueBee()","u":"%3Cinit%3E()"},{"p":"","c":"Mobs","l":"bounceWall(int)"},{"p":"","c":"Mobs","l":"bounceWall(int, GreenfootImage)","u":"bounceWall(int,greenfoot.GreenfootImage)"},{"p":"","c":"Brick","l":"Brick()","u":"%3Cinit%3E()"},{"p":"","c":"Button","l":"Button()","u":"%3Cinit%3E()"},{"p":"","c":"Mobs","l":"changeHP(int)"},{"p":"","c":"Player","l":"changeHP(int)"},{"p":"","c":"Mobs","l":"changeSpeed(int)"},{"p":"","c":"Level","l":"checkNext()"},{"p":"","c":"TitleScreen","l":"checkPressed()"},{"p":"","c":"Coin","l":"Coin()","u":"%3Cinit%3E()"},{"p":"","c":"Level","l":"coinLabel"},{"p":"","c":"Collection","l":"Collection()","u":"%3Cinit%3E()"},{"p":"","c":"Mobs","l":"collision()"},{"p":"","c":"Crown","l":"Crown()","u":"%3Cinit%3E()"},{"p":"","c":"SuperSmoothMover","l":"disableStaticRotation()"},{"p":"","c":"SuperDisplayLabel","l":"drawCenteredText(GreenfootImage, String, int)","u":"drawCenteredText(greenfoot.GreenfootImage,java.lang.String,int)"},{"p":"","c":"SuperDisplayLabel","l":"drawCenteredText(GreenfootImage, String, int, int)","u":"drawCenteredText(greenfoot.GreenfootImage,java.lang.String,int,int)"},{"p":"","c":"SuperSmoothMover","l":"enableStaticRotation()"},{"p":"","c":"EndScreen","l":"EndScreen()","u":"%3Cinit%3E()"},{"p":"","c":"SuperSmoothMover","l":"exactY()"},{"p":"","c":"Level","l":"followPlayer(ImgScroll, Player)","u":"followPlayer(ImgScroll,Player)"},{"p":"","c":"GameOverScreen","l":"GameOverScreen()","u":"%3Cinit%3E()"},{"p":"","c":"Mobs","l":"getDistance(Player)"},{"p":"","c":"SuperSmoothMover","l":"getExactX()"},{"p":"","c":"Mobs","l":"getHP()"},{"p":"","c":"SuperSmoothMover","l":"getImageRotation()"},{"p":"","c":"Level","l":"getMapBoundary()"},{"p":"","c":"Mobs","l":"getPlayer(int)"},{"p":"","c":"SuperSmoothMover","l":"getPreciseRotation()"},{"p":"","c":"SuperSmoothMover","l":"getPreciseX()"},{"p":"","c":"SuperSmoothMover","l":"getPreciseY()"},{"p":"","c":"SuperSmoothMover","l":"getRotation()"},{"p":"","c":"ImgScroll","l":"getScrolledX()"},{"p":"","c":"ImgScroll","l":"getScrolledY()"},{"p":"","c":"ImgScroll","l":"getScrollHeight()"},{"p":"","c":"ImgScroll","l":"getScrollWidth()"},{"p":"","c":"Mobs","l":"getSpeed()"},{"p":"","c":"Player","l":"getSpeed()"},{"p":"","c":"SuperDisplayLabel","l":"getStringWidth(Font, String)","u":"getStringWidth(greenfoot.Font,java.lang.String)"},{"p":"","c":"Level","l":"getWorldSize()"},{"p":"","c":"GreenBee","l":"GreenBee()","u":"%3Cinit%3E()"},{"p":"","c":"Spider","l":"hold()"},{"p":"","c":"Mobs","l":"idle()"},{"p":"","c":"ImgScroll","l":"ImgScroll(World, GreenfootImage)","u":"%3Cinit%3E(greenfoot.World,greenfoot.GreenfootImage)"},{"p":"","c":"ImgScroll","l":"ImgScroll(World, GreenfootImage, int, int)","u":"%3Cinit%3E(greenfoot.World,greenfoot.GreenfootImage,int,int)"},{"p":"","c":"Orb","l":"isBeingTouched()"},{"p":"","c":"Level","l":"Level()","u":"%3Cinit%3E()"},{"p":"","c":"Level0","l":"Level0()","u":"%3Cinit%3E()"},{"p":"","c":"Level1","l":"Level1()","u":"%3Cinit%3E()"},{"p":"","c":"Level","l":"loadLevel(int)"},{"p":"","c":"Mites","l":"Mites()","u":"%3Cinit%3E()"},{"p":"","c":"Mobs","l":"Mobs()","u":"%3Cinit%3E()"},{"p":"","c":"SuperSmoothMover","l":"move(double)"},{"p":"","c":"SuperSmoothMover","l":"move(int)"},{"p":"","c":"Spider","l":"movement()"},{"p":"","c":"Orb","l":"Orb()","u":"%3Cinit%3E()"},{"p":"","c":"Level","l":"player"},{"p":"","c":"Player","l":"Player()","u":"%3Cinit%3E()"},{"p":"","c":"RedBee","l":"RedBee()","u":"%3Cinit%3E()"},{"p":"","c":"RedBee","l":"RedBee(int)","u":"%3Cinit%3E(int)"},{"p":"","c":"SuperSmoothMover","l":"rotateImage(int)"},{"p":"","c":"Level","l":"scroll"},{"p":"","c":"ImgScroll","l":"scroll(int, int)","u":"scroll(int,int)"},{"p":"","c":"SuperSmoothMover","l":"setImageRotation(double)"},{"p":"","c":"SuperSmoothMover","l":"setImageRotation(int)"},{"p":"","c":"SuperDisplayLabel","l":"setLabels(String[])","u":"setLabels(java.lang.String[])"},{"p":"","c":"SuperSmoothMover","l":"setLocation(double, double)","u":"setLocation(double,double)"},{"p":"","c":"SuperSmoothMover","l":"setLocation(int, int)","u":"setLocation(int,int)"},{"p":"","c":"SuperSmoothMover","l":"setRotation(double)"},{"p":"","c":"SuperSmoothMover","l":"setRotation(int)"},{"p":"","c":"Mobs","l":"setSpeed(double)"},{"p":"","c":"Mobs","l":"setSpeed(int)"},{"p":"","c":"Level","l":"spawnFloor(ImgScroll)"},{"p":"","c":"Level","l":"spawnTerrain(int[][])"},{"p":"","c":"Spider","l":"Spider()","u":"%3Cinit%3E()"},{"p":"","c":"SuperDisplayLabel","l":"SuperDisplayLabel()","u":"%3Cinit%3E()"},{"p":"","c":"SuperDisplayLabel","l":"SuperDisplayLabel(Color, Color, Font)","u":"%3Cinit%3E(greenfoot.Color,greenfoot.Color,greenfoot.Font)"},{"p":"","c":"SuperDisplayLabel","l":"SuperDisplayLabel(Color, Color, Font, int)","u":"%3Cinit%3E(greenfoot.Color,greenfoot.Color,greenfoot.Font,int)"},{"p":"","c":"SuperDisplayLabel","l":"SuperDisplayLabel(Font)","u":"%3Cinit%3E(greenfoot.Font)"},{"p":"","c":"SuperSmoothMover","l":"SuperSmoothMover()","u":"%3Cinit%3E()"},{"p":"","c":"Tile","l":"Tile()","u":"%3Cinit%3E()"},{"p":"","c":"Spider","l":"timeout()"},{"p":"","c":"TitleScreen","l":"TitleScreen()","u":"%3Cinit%3E()"},{"p":"","c":"Level","l":"totalCoins"},{"p":"","c":"SuperSmoothMover","l":"turn(double)"},{"p":"","c":"SuperSmoothMover","l":"turn(int)"},{"p":"","c":"SuperSmoothMover","l":"turnImage(int)"},{"p":"","c":"SuperSmoothMover","l":"turnTowards(Actor)","u":"turnTowards(greenfoot.Actor)"},{"p":"","c":"SuperSmoothMover","l":"turnTowards(int, int)","u":"turnTowards(int,int)"},{"p":"","c":"SuperDisplayLabel","l":"update()"},{"p":"","c":"SuperDisplayLabel","l":"update(int[])"},{"p":"","c":"SuperDisplayLabel","l":"update(String)","u":"update(java.lang.String)"},{"p":"","c":"SuperDisplayLabel","l":"update(String, boolean)","u":"update(java.lang.String,boolean)"},{"p":"","c":"SuperDisplayLabel","l":"update(String[], int[])","u":"update(java.lang.String[],int[])"},{"p":"","c":"Mobs","l":"w"}];updateSearchResults(); \ No newline at end of file diff --git a/doc/module-search-index.js b/doc/module-search-index.js new file mode 100644 index 0000000..0d59754 --- /dev/null +++ b/doc/module-search-index.js @@ -0,0 +1 @@ +moduleSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/doc/overview-tree.html b/doc/overview-tree.html new file mode 100644 index 0000000..99eea70 --- /dev/null +++ b/doc/overview-tree.html @@ -0,0 +1,115 @@ + + + + +Class Hierarchy (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For All Packages

+
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/doc/package-search-index.js b/doc/package-search-index.js new file mode 100644 index 0000000..747229e --- /dev/null +++ b/doc/package-search-index.js @@ -0,0 +1 @@ +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"}];updateSearchResults(); \ No newline at end of file diff --git a/doc/package-summary.html b/doc/package-summary.html index 7565e21..fbe7987 100755 --- a/doc/package-summary.html +++ b/doc/package-summary.html @@ -1,22 +1,57 @@ - -Unnamed Package + +Unnamed Package (ArcaneOdyssey) - + + + + + - +
+
@@ -31,10 +66,102 @@

Unnamed Package

Class
Description
- + +
 
+ +
 
+ +
+
Write a description of class Block here.
+
+ +
+
Write a description of class Button here.
+
+ +
+
Write a description of class Coin here.
+
+ +
+
Write a description of class Collection here.
+
+ +
+
Write a description of class Crown here.
+
+ +
+
Write a description of class EndScreen here.
+
+
+
Write a description of class GameOverScreen here.
+
+ +
 
+ +
+
CLASS: ImgScroll (subclass of Object)
+ AUTHOR: danpost (greenfoot.org username)
+ VERSION DATE: April 1, 2015
+
+ DESCRIPTION: a scrolling engine that scrolls the world given to the limits of the scrolling + background image given or to the dimensions given where the given background image is tiled, + if needed, to fill the scrolling area; keep in mind that the smaller the world window is, the + less lag you are likely to get (increasing the world size will cause an exponential increase + in possible lag); this class is designed to keep lag at a minimum by breaking the scrolling + background image into smaller parts so that the entire scrolling background image is not drawn + every time scrolling occurs;
+
+ There are two ways to create a scroller with this class:
+ (1) Use the two-parameter constructor to limit scrolling to the given background image dimensions;
+ (2) Use the four-parameter one to give the dimensions of the scrolling area and have the given + image tiled, if needed, to fill that area;
+
+ +
 
+ +
+
Write a description of class Level0 here.
+
+ +
+
Write a description of class Level1 here.
+
+ +
 
+ +
 
+ +
+
Write a description of class Orb here.
+
+ +
Write a description of class Player here.
+ +
 
+ +
 
+ +
+
A useful label to display game score, stats, or other texts.
+
+ +
+
A variation of an actor that maintains a precise location (using doubles for the co-ordinates + instead of ints).
+
+ +
+
Write a description of class Tile here.
+
+ +
+
Write a description of class TitleScreen here.
+
diff --git a/doc/package-tree.html b/doc/package-tree.html new file mode 100644 index 0000000..cfd652c --- /dev/null +++ b/doc/package-tree.html @@ -0,0 +1,115 @@ + + + + + Class Hierarchy (ArcaneOdyssey) + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Unnamed Package

+
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/doc/resources/glass.png b/doc/resources/glass.png new file mode 100644 index 0000000..a7f591f Binary files /dev/null and b/doc/resources/glass.png differ diff --git a/doc/resources/x.png b/doc/resources/x.png new file mode 100644 index 0000000..30548a7 Binary files /dev/null and b/doc/resources/x.png differ diff --git a/doc/script-dir/jquery-3.6.1.min.js b/doc/script-dir/jquery-3.6.1.min.js new file mode 100644 index 0000000..2c69bc9 --- /dev/null +++ b/doc/script-dir/jquery-3.6.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=x.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthC(E(s),E(n))?o.important="horizontal":o.important="vertical",c.using.call(this,t,o)}),l.offset(x.extend(u,{using:t}))})},x.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,l=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=x(t.target),i=x(x.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){x.contains(this.element[0],x.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=x(t.target).closest(".ui-menu-item"),i=x(t.currentTarget),e[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=x(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case x.ui.keyCode.PAGE_UP:this.previousPage(t);break;case x.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case x.ui.keyCode.HOME:this._move("first","first",t);break;case x.ui.keyCode.END:this._move("last","last",t);break;case x.ui.keyCode.UP:this.previous(t);break;case x.ui.keyCode.DOWN:this.next(t);break;case x.ui.keyCode.LEFT:this.collapse(t);break;case x.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case x.ui.keyCode.ENTER:case x.ui.keyCode.SPACE:this._activate(t);break;case x.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=x(this),e=t.prev(),i=x("").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=x(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(e=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(e,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!x.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(i=parseFloat(x.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(x.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&this._isContentEditable(this.element),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=x("
    ").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){x(t.target).trigger(t.originalEvent)});s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(x("
    ").text(i))},100))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==x.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=x("
    ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||x.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?x(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(x.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=x.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(x("
    ").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),x.extend(x.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(x.ui.autocomplete.escapeRegex(e),"i");return x.grep(t,function(t){return i.test(t.label||t.value||t)})}}),x.widget("ui.autocomplete",x.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1").text(e))},100))}});x.ui.autocomplete}); \ No newline at end of file diff --git a/doc/search.js b/doc/search.js new file mode 100644 index 0000000..db3b2f4 --- /dev/null +++ b/doc/search.js @@ -0,0 +1,354 @@ +/* + * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var noResult = {l: "No results found"}; +var loading = {l: "Loading search index..."}; +var catModules = "Modules"; +var catPackages = "Packages"; +var catTypes = "Classes and Interfaces"; +var catMembers = "Members"; +var catSearchTags = "Search Tags"; +var highlight = "$&"; +var searchPattern = ""; +var fallbackPattern = ""; +var RANKING_THRESHOLD = 2; +var NO_MATCH = 0xffff; +var MIN_RESULTS = 3; +var MAX_RESULTS = 500; +var UNNAMED = ""; +function escapeHtml(str) { + return str.replace(//g, ">"); +} +function getHighlightedText(item, matcher, fallbackMatcher) { + var escapedItem = escapeHtml(item); + var highlighted = escapedItem.replace(matcher, highlight); + if (highlighted === escapedItem) { + highlighted = escapedItem.replace(fallbackMatcher, highlight) + } + return highlighted; +} +function getURLPrefix(ui) { + var urlPrefix=""; + var slash = "/"; + if (ui.item.category === catModules) { + return ui.item.l + slash; + } else if (ui.item.category === catPackages && ui.item.m) { + return ui.item.m + slash; + } else if (ui.item.category === catTypes || ui.item.category === catMembers) { + if (ui.item.m) { + urlPrefix = ui.item.m + slash; + } else { + $.each(packageSearchIndex, function(index, item) { + if (item.m && ui.item.p === item.l) { + urlPrefix = item.m + slash; + } + }); + } + } + return urlPrefix; +} +function createSearchPattern(term) { + var pattern = ""; + var isWordToken = false; + term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) { + if (index > 0) { + // whitespace between identifiers is significant + pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*"; + } + var tokens = w.split(/(?=[A-Z,.()<>[\/])/); + for (var i = 0; i < tokens.length; i++) { + var s = tokens[i]; + if (s === "") { + continue; + } + pattern += $.ui.autocomplete.escapeRegex(s); + isWordToken = /\w$/.test(s); + if (isWordToken) { + pattern += "([a-z0-9_$<>\\[\\]]*?)"; + } + } + }); + return pattern; +} +function createMatcher(pattern, flags) { + var isCamelCase = /[A-Z]/.test(pattern); + return new RegExp(pattern, flags + (isCamelCase ? "" : "i")); +} +var watermark = 'Search'; +$(function() { + var search = $("#search-input"); + var reset = $("#reset-button"); + search.val(''); + search.prop("disabled", false); + reset.prop("disabled", false); + search.val(watermark).addClass('watermark'); + search.blur(function() { + if ($(this).val().length === 0) { + $(this).val(watermark).addClass('watermark'); + } + }); + search.on('click keydown paste', function() { + if ($(this).val() === watermark) { + $(this).val('').removeClass('watermark'); + } + }); + reset.click(function() { + search.val('').focus(); + }); + search.focus()[0].setSelectionRange(0, 0); +}); +$.widget("custom.catcomplete", $.ui.autocomplete, { + _create: function() { + this._super(); + this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); + }, + _renderMenu: function(ul, items) { + var rMenu = this; + var currentCategory = ""; + rMenu.menu.bindings = $(); + $.each(items, function(index, item) { + var li; + if (item.category && item.category !== currentCategory) { + ul.append("
  • " + item.category + "
  • "); + currentCategory = item.category; + } + li = rMenu._renderItemData(ul, item); + if (item.category) { + li.attr("aria-label", item.category + " : " + item.l); + li.attr("class", "result-item"); + } else { + li.attr("aria-label", item.l); + li.attr("class", "result-item"); + } + }); + }, + _renderItem: function(ul, item) { + var label = ""; + var matcher = createMatcher(escapeHtml(searchPattern), "g"); + var fallbackMatcher = new RegExp(fallbackPattern, "gi") + if (item.category === catModules) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catPackages) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catTypes) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catMembers) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.c + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.c + "." + item.l, matcher, fallbackMatcher); + } else if (item.category === catSearchTags) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else { + label = item.l; + } + var li = $("
  • ").appendTo(ul); + var div = $("
    ").appendTo(li); + if (item.category === catSearchTags && item.h) { + if (item.d) { + div.html(label + " (" + item.h + ")
    " + + item.d + "
    "); + } else { + div.html(label + " (" + item.h + ")"); + } + } else { + if (item.m) { + div.html(item.m + "/" + label); + } else { + div.html(label); + } + } + return li; + } +}); +function rankMatch(match, category) { + if (!match) { + return NO_MATCH; + } + var index = match.index; + var input = match.input; + var leftBoundaryMatch = 2; + var periferalMatch = 0; + // make sure match is anchored on a left word boundary + if (index === 0 || /\W/.test(input[index - 1]) || "_" === input[index]) { + leftBoundaryMatch = 0; + } else if ("_" === input[index - 1] || (input[index] === input[index].toUpperCase() && !/^[A-Z0-9_$]+$/.test(input))) { + leftBoundaryMatch = 1; + } + var matchEnd = index + match[0].length; + var leftParen = input.indexOf("("); + var endOfName = leftParen > -1 ? leftParen : input.length; + // exclude peripheral matches + if (category !== catModules && category !== catSearchTags) { + var delim = category === catPackages ? "/" : "."; + if (leftParen > -1 && leftParen < index) { + periferalMatch += 2; + } else if (input.lastIndexOf(delim, endOfName) >= matchEnd) { + periferalMatch += 2; + } + } + var delta = match[0].length === endOfName ? 0 : 1; // rank full match higher than partial match + for (var i = 1; i < match.length; i++) { + // lower ranking if parts of the name are missing + if (match[i]) + delta += match[i].length; + } + if (category === catTypes) { + // lower ranking if a type name contains unmatched camel-case parts + if (/[A-Z]/.test(input.substring(matchEnd))) + delta += 5; + if (/[A-Z]/.test(input.substring(0, index))) + delta += 5; + } + return leftBoundaryMatch + periferalMatch + (delta / 200); + +} +function doSearch(request, response) { + var result = []; + searchPattern = createSearchPattern(request.term); + fallbackPattern = createSearchPattern(request.term.toLowerCase()); + if (searchPattern === "") { + return this.close(); + } + var camelCaseMatcher = createMatcher(searchPattern, ""); + var fallbackMatcher = new RegExp(fallbackPattern, "i"); + + function searchIndexWithMatcher(indexArray, matcher, category, nameFunc) { + if (indexArray) { + var newResults = []; + $.each(indexArray, function (i, item) { + item.category = category; + var ranking = rankMatch(matcher.exec(nameFunc(item)), category); + if (ranking < RANKING_THRESHOLD) { + newResults.push({ranking: ranking, item: item}); + } + return newResults.length <= MAX_RESULTS; + }); + return newResults.sort(function(e1, e2) { + return e1.ranking - e2.ranking; + }).map(function(e) { + return e.item; + }); + } + return []; + } + function searchIndex(indexArray, category, nameFunc) { + var primaryResults = searchIndexWithMatcher(indexArray, camelCaseMatcher, category, nameFunc); + result = result.concat(primaryResults); + if (primaryResults.length <= MIN_RESULTS && !camelCaseMatcher.ignoreCase) { + var secondaryResults = searchIndexWithMatcher(indexArray, fallbackMatcher, category, nameFunc); + result = result.concat(secondaryResults.filter(function (item) { + return primaryResults.indexOf(item) === -1; + })); + } + } + + searchIndex(moduleSearchIndex, catModules, function(item) { return item.l; }); + searchIndex(packageSearchIndex, catPackages, function(item) { + return (item.m && request.term.indexOf("/") > -1) + ? (item.m + "/" + item.l) : item.l; + }); + searchIndex(typeSearchIndex, catTypes, function(item) { + return request.term.indexOf(".") > -1 ? item.p + "." + item.l : item.l; + }); + searchIndex(memberSearchIndex, catMembers, function(item) { + return request.term.indexOf(".") > -1 + ? item.p + "." + item.c + "." + item.l : item.l; + }); + searchIndex(tagSearchIndex, catSearchTags, function(item) { return item.l; }); + + if (!indexFilesLoaded()) { + updateSearchResults = function() { + doSearch(request, response); + } + result.unshift(loading); + } else { + updateSearchResults = function() {}; + } + response(result); +} +$(function() { + $("#search-input").catcomplete({ + minLength: 1, + delay: 300, + source: doSearch, + response: function(event, ui) { + if (!ui.content.length) { + ui.content.push(noResult); + } else { + $("#search-input").empty(); + } + }, + autoFocus: true, + focus: function(event, ui) { + return false; + }, + position: { + collision: "flip" + }, + select: function(event, ui) { + if (ui.item.category) { + var url = getURLPrefix(ui); + if (ui.item.category === catModules) { + url += "module-summary.html"; + } else if (ui.item.category === catPackages) { + if (ui.item.u) { + url = ui.item.u; + } else { + url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; + } + } else if (ui.item.category === catTypes) { + if (ui.item.u) { + url = ui.item.u; + } else if (ui.item.p === UNNAMED) { + url += ui.item.l + ".html"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html"; + } + } else if (ui.item.category === catMembers) { + if (ui.item.p === UNNAMED) { + url += ui.item.c + ".html" + "#"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; + } + if (ui.item.u) { + url += ui.item.u; + } else { + url += ui.item.l; + } + } else if (ui.item.category === catSearchTags) { + url += ui.item.u; + } + if (top !== window) { + parent.classFrame.location = pathtoroot + url; + } else { + window.location.href = pathtoroot + url; + } + $("#search-input").focus(); + } + } + }); +}); diff --git a/doc/stylesheet.css b/doc/stylesheet.css old mode 100755 new mode 100644 index 836c62d..4a576bd --- a/doc/stylesheet.css +++ b/doc/stylesheet.css @@ -611,6 +611,7 @@ main, nav, header, footer, section { ul.ui-autocomplete { position:fixed; z-index:999999; + background-color: #FFFFFF; } ul.ui-autocomplete li { float:left; @@ -620,6 +621,9 @@ ul.ui-autocomplete li { .result-highlight { font-weight:bold; } +.ui-autocomplete .result-item { + font-size: inherit; +} #search-input { background-image:url('resources/glass.png'); background-size:13px; diff --git a/doc/tag-search-index.js b/doc/tag-search-index.js new file mode 100644 index 0000000..0367dae --- /dev/null +++ b/doc/tag-search-index.js @@ -0,0 +1 @@ +tagSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/doc/type-search-index.js b/doc/type-search-index.js new file mode 100644 index 0000000..66a3b64 --- /dev/null +++ b/doc/type-search-index.js @@ -0,0 +1 @@ +typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"","l":"Bee"},{"p":"","l":"BlueBee"},{"p":"","l":"Brick"},{"p":"","l":"Button"},{"p":"","l":"Coin"},{"p":"","l":"Collection"},{"p":"","l":"Crown"},{"p":"","l":"EndScreen"},{"p":"","l":"GameOverScreen"},{"p":"","l":"GreenBee"},{"p":"","l":"ImgScroll"},{"p":"","l":"Level"},{"p":"","l":"Level0"},{"p":"","l":"Level1"},{"p":"","l":"Mites"},{"p":"","l":"Mobs"},{"p":"","l":"Orb"},{"p":"","l":"Player"},{"p":"","l":"RedBee"},{"p":"","l":"Spider"},{"p":"","l":"SuperDisplayLabel"},{"p":"","l":"SuperSmoothMover"},{"p":"","l":"Tile"},{"p":"","l":"TitleScreen"}];updateSearchResults(); \ No newline at end of file diff --git a/levels/0.csv b/levels/0.csv index d166b27..e7acf8f 100755 --- a/levels/0.csv +++ b/levels/0.csv @@ -30,10 +30,29 @@ 28,7,1 29,5,1 30,5,1 +30,4,9 31,5,1 32,7,1 33,7,1 33,9,1 34,9,1 35,9,1 -17,9,2 +40,10,1 +41,9,1 +41,10,1 +42,8,1 +42,9,1 +42,10,1 +43,8,1 +43,9,3 +43,10,3 +44,8,1 +44,9,3 +44,10,3 +45,8,1 +45,9,3 +45,10,3 +46,8,1 +46,9,3 +46,10,3 +50,10,2