本文整理匯總了Java中com.watabou.input.NoosaInputProcessor.modifier方法的典型用法代碼示例。如果您正苦於以下問題:Java NoosaInputProcessor.modifier方法的具體用法?Java NoosaInputProcessor.modifier怎麽用?Java NoosaInputProcessor.modifier使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.watabou.input.NoosaInputProcessor
的用法示例。
在下文中一共展示了NoosaInputProcessor.modifier方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onClick
import com.watabou.input.NoosaInputProcessor; //導入方法依賴的package包/類
@Override
protected void onClick() {
if (!lastBag.contains(item) && !item.isEquipped(Dungeon.hero)){
hide();
} else if (listener != null) {
hide();
listener.onSelect( item );
} else {
if (NoosaInputProcessor.modifier) {
onLongClick();
} else {
GameScene.show(new WndItem( WndBag.this, item ) );
}
}
}
示例2: createChildren
import com.watabou.input.NoosaInputProcessor; //導入方法依賴的package包/類
@Override
protected void createChildren() {
hotArea = new TouchArea<T>( 0, 0, 0, 0 ) {
@Override
protected void onTouchDown(NoosaInputProcessor.Touch touch) {
pressed = true;
pressTime = 0;
processed = false;
Button.this.onTouchDown();
};
@Override
protected void onTouchUp(NoosaInputProcessor.Touch touch) {
pressed = false;
Button.this.onTouchUp();
};
@Override
protected void onClick( NoosaInputProcessor.Touch touch ) {
if (!processed) {
if (NoosaInputProcessor.modifier && onLongClick()) {
// Do nothing
} else {
Button.this.onClick();
}
}
};
@Override
public boolean onKeyDown(NoosaInputProcessor.Key<T> key) {
return Button.this.onKeyDown(key);
}
@Override
public boolean onKeyUp(NoosaInputProcessor.Key<T> key) {
return Button.this.onKeyUp(key);
}
};
add( hotArea );
}
示例3: onKeyUp
import com.watabou.input.NoosaInputProcessor; //導入方法依賴的package包/類
protected boolean onKeyUp(NoosaInputProcessor.Key<T> key) {
if (active && hotKey != null && key.action.equals(hotKey)) {
if (NoosaInputProcessor.modifier) {
return onLongClick();
} else {
onClick();
return true;
}
} else {
return false;
}
}
示例4: createChildren
import com.watabou.input.NoosaInputProcessor; //導入方法依賴的package包/類
@Override
protected void createChildren() {
hotArea = new TouchArea<T>( 0, 0, 0, 0 ) {
@Override
protected void onTouchDown(NoosaInputProcessor.Touch touch) {
pressed = true;
pressTime = 0;
processed = false;
Button.this.onTouchDown();
};
@Override
protected void onTouchUp(NoosaInputProcessor.Touch touch) {
pressed = false;
Button.this.onTouchUp();
};
@Override
protected void onClick( NoosaInputProcessor.Touch touch ) {
if (!processed) {
if (NoosaInputProcessor.modifier && onLongClick()) {
// Do nothing
} else {
Button.this.onClick();
}
}
};
@Override
public boolean onKeyDown(NoosaInputProcessor.Key<T> key) {
return Button.this.onKeyDown(key);
}
@Override
public boolean onKeyUp(NoosaInputProcessor.Key<T> key) {
return Button.this.onKeyUp(key);
}
};
add(hotArea);
}
示例5: onKeyUp
import com.watabou.input.NoosaInputProcessor; //導入方法依賴的package包/類
protected boolean onKeyUp(NoosaInputProcessor.Key<T> key) {
if (active && hotKey != null && key.action.equals(hotKey)) {
if (NoosaInputProcessor.modifier) {
return onLongClick();
} else {
onClick();
return true;
}
} else {
return false;
}
}
示例6: onKeyUp
import com.watabou.input.NoosaInputProcessor; //導入方法依賴的package包/類
protected boolean onKeyUp(NoosaInputProcessor.Key<T> key) {
if (active && hotKey != null && key.action.equals(hotKey)) {
if (NoosaInputProcessor.modifier) {
return onLongClick();
} else {
onClick();
return true;
}
} else {
return false;
}
}
示例7: onSelect
import com.watabou.input.NoosaInputProcessor; //導入方法依賴的package包/類
@Override
public void onSelect( Integer cell ) {
if (NoosaInputProcessor.modifier) {
examineCell( cell );
} else {
if (Dungeon.hero.handle(cell)) {
Dungeon.hero.next();
}
}
}
示例8: createChildren
import com.watabou.input.NoosaInputProcessor; //導入方法依賴的package包/類
@Override
protected void createChildren() {
super.createChildren();
slot = new ItemSlot() {
@Override
protected void onClick() {
if (!Dungeon.hero.isAlive())
return;
if (NoosaInputProcessor.modifier) {
onLongClick();
return;
}
if (targeting) {
int cell = autoAim(lastTarget, select(slotNum));
if (cell != -1){
GameScene.handleCell(cell);
} else {
//couldn't auto-aim, just target the position and hope for the best.
GameScene.handleCell( lastTarget.pos );
}
} else {
Item item = select(slotNum);
if (item.usesTargeting)
useTargeting();
item.execute( Dungeon.hero );
}
}
@Override
protected boolean onLongClick() {
return QuickSlotButton.this.onLongClick();
}
@Override
protected void onTouchDown() {
icon.lightness( 0.7f );
}
@Override
protected void onTouchUp() {
icon.resetColor();
}
};
slot.showParams( true, false, true );
add( slot );
crossB = Icons.TARGET.get();
crossB.visible = false;
add( crossB );
crossM = new Image();
crossM.copy( crossB );
}