data
Class Obstacle

java.lang.Object
  extended by data.GameEntity
      extended by data.Obstacle

public class Obstacle
extends GameEntity

Author:
Tansel

Field Summary
private  boolean type
          This boolean variable will let us to determine the type of the Obstacle false = breakable true = unbreakable
 
Fields inherited from class data.GameEntity
dx, dy, ge, sm, sprite, x, y
 
Constructor Summary
Obstacle(GameEngine ge, java.lang.String file, int x, int y, ScreenManager sm, boolean type)
           
 
Method Summary
 void collidedWith(GameEntity entity)
          When a collision between a Sting and obstacle, obstacle will be destroyed if it is breakable.
 
Methods inherited from class data.GameEntity
collidesWith, draw, getX, getY, move
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

private boolean type
This boolean variable will let us to determine the type of the Obstacle false = breakable true = unbreakable

Constructor Detail

Obstacle

public Obstacle(GameEngine ge,
                java.lang.String file,
                int x,
                int y,
                ScreenManager sm,
                boolean type)
Parameters:
ge -
file -
x -
y -
sm -
type -
Method Detail

collidedWith

public void collidedWith(GameEntity entity)
When a collision between a Sting and obstacle, obstacle will be destroyed if it is breakable. It also stops the chain and rope types of stings, and destroys the rope type of sting.

Specified by:
collidedWith in class GameEntity