-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameObject2DAsgm.java
More file actions
36 lines (36 loc) · 977 Bytes
/
Copy pathGameObject2DAsgm.java
File metadata and controls
36 lines (36 loc) · 977 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
package awpsoft.gamemodule;
import java.awt.Image;
import awpsoft.gamemodule.AsgmDrawFactory.*;
public class GameObject2DAsgm extends GameObject2D
{
protected Image Image;
public GameObject2DAsgm() {Image = null;}
public void setImage(Image img){Image = img;}
public DrawParameters getDrawParameters()
{
DrawParameters tmp = new DrawParameters();
if (!Enable) return tmp;
tmp.Image = Image;
if (null != tmp.Image) return tmp;
tmp.Visible = Visible;
tmp.PosCenterX = PosCenterX;
tmp.PosCenterY = PosCenterY;
tmp.PicCenterX = PicCenterX;
tmp.PicCenterY = PicCenterY;
tmp.RotationDEG = RotationDEG;
tmp.WScale = WScale;
tmp.HScale = HScale;
tmp.SecondaryAlpha = SecondaryAlpha;
return tmp;
}
public void draw(AsgmDrawFactory drawFactory)
{
if (!Enable || !Visible) return;
drawFactory.drawStep(getDrawParameters());
}
@Override public void reset()
{
super.reset();
Image = null;
}
}