当前位置: 首页>>代码示例>>Java>>正文


Java TimekeepersHourglass.timeFreeze方法代码示例

本文整理汇总了Java中com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass.timeFreeze方法的典型用法代码示例。如果您正苦于以下问题:Java TimekeepersHourglass.timeFreeze方法的具体用法?Java TimekeepersHourglass.timeFreeze怎么用?Java TimekeepersHourglass.timeFreeze使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass的用法示例。


在下文中一共展示了TimekeepersHourglass.timeFreeze方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: dispel

import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass; //导入方法依赖的package包/类
public static void dispel() {
	Invisibility buff = Dungeon.hero.buff( Invisibility.class );
	if (buff != null) {
		buff.detach();
	}
       CloakOfShadows.cloakStealth cloakBuff = Dungeon.hero.buff( CloakOfShadows.cloakStealth.class );
       if (cloakBuff != null) {
           cloakBuff.act();
           cloakBuff.detach();
       }
       //this isn't a form of invisibilty, but it is meant to dispel at the same time as it.
       TimekeepersHourglass.timeFreeze timeFreeze = Dungeon.hero.buff( TimekeepersHourglass.timeFreeze.class );
       if (timeFreeze != null) {
           timeFreeze.detach();
       }
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:17,代码来源:Invisibility.java

示例2: spend

import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass; //导入方法依赖的package包/类
@Override
public void spend( float time ) {
	TimekeepersHourglass.timeFreeze buff = buff(TimekeepersHourglass.timeFreeze.class);
	if (buff != null){
		buff.processTime(time);
	} else {
		super.spend(time);
	}
}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:10,代码来源:Hero.java

示例3: dispel

import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass; //导入方法依赖的package包/类
public static void dispel() {
	Invisibility buff = Dungeon.hero.buff( Invisibility.class );
	if (buff != null) {
		buff.detach();
	}
	CloakOfShadows.cloakStealth cloakBuff = Dungeon.hero.buff( CloakOfShadows.cloakStealth.class );
	if (cloakBuff != null) {
		cloakBuff.dispel();
	}
	//this isn't a form of invisibilty, but it is meant to dispel at the same time as it.
	TimekeepersHourglass.timeFreeze timeFreeze = Dungeon.hero.buff( TimekeepersHourglass.timeFreeze.class );
	if (timeFreeze != null) {
		timeFreeze.detach();
	}
}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:16,代码来源:Invisibility.java

示例4: spend

import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass; //导入方法依赖的package包/类
@Override
public void spend( float time ) {
    TimekeepersHourglass.timeFreeze buff = buff(TimekeepersHourglass.timeFreeze.class);
    if (!(buff != null && buff.processTime(time)))
        super.spend( time );
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:7,代码来源:Hero.java

示例5: press

import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass; //导入方法依赖的package包/类
public void press( int cell, Char ch ) {

		if (ch != null && pit[cell] && !ch.flying) {
			if (ch == Dungeon.hero) {
				Chasm.heroFall(cell);
			} else if (ch instanceof Mob) {
				Chasm.mobFall( (Mob)ch );
			}
			return;
		}
		
		Trap trap = null;
		
		switch (map[cell]) {
		
		case Terrain.SECRET_TRAP:
			GLog.i( Messages.get(Level.class, "hidden_plate") );
		case Terrain.TRAP:
			trap = traps.get( cell );
			break;
			
		case Terrain.HIGH_GRASS:
			HighGrass.trample( this, cell, ch );
			break;
			
		case Terrain.WELL:
			WellWater.affectCell( cell );
			break;
			
		case Terrain.DOOR:
			Door.enter( cell );
			break;
		}

		TimekeepersHourglass.timeFreeze timeFreeze = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);

		if (trap != null) {
			if (timeFreeze == null) {

				if (ch == Dungeon.hero)
					Dungeon.hero.interrupt();

				trap.trigger();

			} else {

				Sample.INSTANCE.play(Assets.SND_TRAP);

				discover(cell);

				timeFreeze.setDelayedPress(cell);

			}
		}
		
		Plant plant = plants.get( cell );
		if (plant != null) {
			plant.trigger();
		}
	}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:61,代码来源:Level.java


注:本文中的com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass.timeFreeze方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。