Class StaticObject


  • public abstract class StaticObject
    extends greenfoot.Actor
    Represents any static objects that should interact with the PhysixObjects. These objects do not move in any way by default and are mainly there to differ between collidable objects and others.
    Version:
    1.0
    Author:
    RcCookie
    • Constructor Summary

      Constructors 
      Constructor Description
      StaticObject()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void act()
      Calls the run method.
      abstract void run()
      This method should contain all stuff that usually would be in the act method.
      • 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, turn, turnTowards
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StaticObject

        public StaticObject()
    • Method Detail

      • act

        public final void act()
        Calls the run method. No other purpose. Final to fit the style of PhysixObjects.
        Overrides:
        act in class greenfoot.Actor
      • run

        public abstract void run()
        This method should contain all stuff that usually would be in the act method. It is called once per frame by the act method. This method has to be overridden in the extending classes, even if it stays empty. Usually though it contains for examle user input actions. This method is abstract mainly to be noticed by the user as he is used to overriding the act method which is not possible.