本文整理汇总了Java中com.shatteredpixel.shatteredpixeldungeon.actors.Actor.remove方法的典型用法代码示例。如果您正苦于以下问题:Java Actor.remove方法的具体用法?Java Actor.remove怎么用?Java Actor.remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.shatteredpixel.shatteredpixeldungeon.actors.Actor
的用法示例。
在下文中一共展示了Actor.remove方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: act
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; //导入方法依赖的package包/类
@Override
protected boolean act() {
if (sprite != null) {
if (effect == null) {
new Effect();
}
}
Actor.remove( Pushing.this );
//so that all pushing effects at the same time go simultaneously
for ( Actor actor : Actor.all() ){
if (actor instanceof Pushing && ((Pushing) actor).cooldown() == 0)
return true;
}
return false;
}
示例2: update
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; //导入方法依赖的package包/类
@Override
public void update() {
super.update();
if ((delay += Game.elapsed) < DELAY) {
sprite.x = x;
sprite.y = y;
} else {
sprite.point(end);
killAndErase();
Actor.remove(Pushing.this);
if (callback != null) callback.call();
next();
}
}
示例3: act
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; //导入方法依赖的package包/类
@Override
protected boolean act() {
//something caused our bomb to explode early, or be defused. Do nothing.
if (bomb.fuse != this){
Actor.remove( this );
return true;
}
//look for our bomb, remove it from its heap, and blow it up.
for (Heap heap : Dungeon.level.heaps.values()) {
if (heap.items.contains(bomb)) {
heap.items.remove(bomb);
bomb.explode(heap.pos);
Actor.remove(this);
return true;
}
}
//can't find our bomb, something must have removed it, do nothing.
bomb.fuse = null;
Actor.remove( this );
return true;
}
示例4: act
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; //导入方法依赖的package包/类
@Override
protected boolean act() {
if (sprite != null) {
if (effect == null) {
new Effect();
}
return false;
} else {
Actor.remove( Pushing.this );
return true;
}
}
示例5: finish
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; //导入方法依赖的package包/类
private void finish( Effect eff ) {
if (eff == eff1) {
eff1 = null;
}
if (eff == eff2) {
eff2 = null;
}
if (eff1 == null && eff2 == null) {
Actor.remove( this );
next();
int pos = ch1.pos;
ch1.pos = ch2.pos;
ch2.pos = pos;
if (!ch1.flying) {
if (ch1 instanceof Mob) {
Dungeon.level.mobPress( (Mob)ch1 );
} else {
Dungeon.level.press( ch1.pos, ch1 );
}
}
if (!ch2.flying) {
if (ch2 instanceof Mob) {
Dungeon.level.mobPress( (Mob)ch2 );
} else {
Dungeon.level.press( ch2.pos, ch2 );
}
}
if (ch1 == Dungeon.hero || ch2 == Dungeon.hero) {
Dungeon.observe();
GameScene.updateFog();
}
}
}
示例6: update
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; //导入方法依赖的package包/类
@Override
public void update() {
super.update();
if ((delay += Game.elapsed) < DELAY) {
sprite.x = x;
sprite.y = y;
} else {
sprite.point( end );
killAndErase();
Actor.remove( Pushing.this );
next();
}
}