Interface Actor

All Superinterfaces:
Acoustics, Graphics, Positionable, Updatable
All Known Implementing Classes:
AreaEntity, Background, CellMouseIndicator, CollectableAreaEntity, DraggableAreaEntity, Entity, Foreground, GraphicsEntity, Grid, MovableAreaEntity, Path, Text

public interface Actor extends Updatable, Graphics, Acoustics, Positionable
Top game object, which is directly managed by the game. Smaller components and helpers are usually owned by actors themselves.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    bip(Audio audio)
    Play itself on specified Audio context.
    default void
    draw(Canvas canvas)
    Renders itself on specified canvas.
    default void
    update(float deltaTime)
    Simulates a single time step.

    Methods inherited from interface ch.epfl.cs107.play.math.Positionable

    getPosition, getTransform, getVelocity
  • Method Details

    • update

      default void update(float deltaTime)
      Description copied from interface: Updatable
      Simulates a single time step. Note: Need to be Override
      Specified by:
      update in interface Updatable
      Parameters:
      deltaTime - elapsed time since last update, in seconds, non-negative
    • bip

      default void bip(Audio audio)
      Description copied from interface: Acoustics
      Play itself on specified Audio context.
      Specified by:
      bip in interface Acoustics
      Parameters:
      audio - (Audio) target, not null
    • draw

      default void draw(Canvas canvas)
      Description copied from interface: Graphics
      Renders itself on specified canvas.
      Specified by:
      draw in interface Graphics
      Parameters:
      canvas - target, not null