📄 goal.java
字号:
/*
* @(#)Goal.java 1.0 04/07/01 @(#)
*
* Copyright 2004 NTT DoCoMo, Inc. All rights reserved.
*/
/**
* Goal<BR>
* The definition class of goal.
* <p>
* @version 1.0
* </p>
*/
public class Goal extends AbstractItem {
/** Validity of this object */
private boolean enabled;
/** The initial display position of this object */
private int initPosX;
/**
* Constructor.
* @param _leftEndOfCourse Coordinates at the left end of a course
*/
public Goal(int _leftEndOfCourse) {
super(TYPE_GOAL_LINE, MediaCollection.IMG_GOAL);
initPosX = _leftEndOfCourse;
setPosX(initPosX);
setPosY(1);
enabled = false;
}
/**
* Gets the Validity of this object.
* @return Validity
*/
public boolean isEnabled() {
return this.enabled;
}
/**
* Changes the effective / non-effect of this object.
* @param _enabled Effective:true
*/
public void setEnabled(boolean _enabled) {
if ((!this.enabled) && (_enabled)) {
setPosX(initPosX);
setPosY(1);
}
this.enabled = _enabled;
}
/*
* @see AbstractItem#contact()
*/
public void contact() {
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -