forked from TechHead27/EW
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBox.java
More file actions
39 lines (35 loc) · 750 Bytes
/
Box.java
File metadata and controls
39 lines (35 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import greenfoot.*;
/**
* Write a description of class Box here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Box extends Actor
{
public int x, y;
/**
* Constructor for objects of class Box
*/
public Box(boolean forCollision)
{
GreenfootImage image;
if (forCollision)
{
// make the box invisible
}
else
{
// use the image to wrap the monster
image = new GreenfootImage("images/hitBox.png");
image.scale(105,105);
setImage(image);
}
}
/**
* surround enemies
* enemy1 - 390, 60
* enemy2 - 520, 110
* enemy3 - 390, 180
*/
}