本文整理汇总了Java中com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Shadows类的典型用法代码示例。如果您正苦于以下问题:Java Shadows类的具体用法?Java Shadows怎么用?Java Shadows使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Shadows类属于com.shatteredpixel.shatteredpixeldungeon.actors.buffs包,在下文中一共展示了Shadows类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: evolve
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Shadows; //导入依赖的package包/类
@Override
protected void evolve() {
int[] map = Dungeon.level.map;
boolean visible = false;
int cell;
for (int i = area.left; i < area.right; i++) {
for (int j = area.top; j < area.bottom; j++) {
cell = i + j*Dungeon.level.width();
if (cur[cell] > 0) {
off[cell] = cur[cell];
volume += off[cell];
if (map[cell] == Terrain.EMBERS) {
map[cell] = Terrain.GRASS;
GameScene.updateMap(cell);
}
visible = visible || Dungeon.level.heroFOV[cell];
} else {
off[cell] = 0;
}
}
}
Hero hero = Dungeon.hero;
if (hero.isAlive() && hero.visibleEnemies() == 0 && cur[hero.pos] > 0) {
Buff.affect( hero, Shadows.class ).prolong();
}
if (visible) {
Notes.add( Notes.Landmark.GARDEN );
}
}
示例2: evolve
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Shadows; //导入依赖的package包/类
@Override
protected void evolve() {
int from = WIDTH + 1;
int to = Level.LENGTH - WIDTH - 1;
int[] map = Dungeon.level.map;
boolean regrowth = false;
boolean visible = false;
for (int pos=from; pos < to; pos++) {
if (cur[pos] > 0) {
off[pos] = cur[pos];
volume += off[pos];
if (map[pos] == Terrain.EMBERS) {
map[pos] = Terrain.GRASS;
regrowth = true;
}
visible = visible || Dungeon.visible[pos];
} else {
off[pos] = 0;
}
}
Hero hero = Dungeon.hero;
if (hero.isAlive() && hero.visibleEnemies() == 0 && cur[hero.pos] > 0) {
Buff.affect( hero, Shadows.class ).prolong();
}
if (regrowth) {
GameScene.updateMap();
}
if (visible) {
Journal.add( Journal.Feature.GARDEN );
}
}