Java Code Examples for com.watabou.noosa.Group#recycle()

The following examples show how to use com.watabou.noosa.Group#recycle() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Wound.java    From unleashed-pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
public static void hit( int pos, float angle ) {
	Group parent = Dungeon.hero.sprite.parent;
	Wound w = (Wound)parent.recycle( Wound.class );
	parent.bringToFront( w );
	w.reset( pos );
	w.angle = angle;
}
 
Example 2
Source File: Wound.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 5 votes vote down vote up
public static void hit( int pos, float angle ) {
	Group parent = Dungeon.hero.sprite.parent;
	Wound w = (Wound)parent.recycle( Wound.class );
	parent.bringToFront( w );
	w.reset( pos );
	w.angle = angle;
}
 
Example 3
Source File: MagicMissile.java    From pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void coldLight( Group group, int from, int to, Callback callback ) {
	MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class ));
	missile.reset( from, to, callback );
	missile.size( 4 );
	missile.pour( ColdParticle.FACTORY, 0.01f );
}
 
Example 4
Source File: MagicMissile.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void whiteLight( Group group, int from, int to, Callback callback ) {
	MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class ));
	missile.reset( from, to, callback );
	missile.size( 4 );
	missile.pour( WhiteParticle.FACTORY, 0.01f );
}
 
Example 5
Source File: HolyLight.java    From YetAnotherPixelDungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void createAtPos( int pos ) {
	Group parent = Dungeon.hero.sprite.parent;
	HolyLight w = (HolyLight)parent.recycle( HolyLight.class );
	parent.bringToFront( w );
	w.reset( pos );
}
 
Example 6
Source File: MagicMissile.java    From YetAnotherPixelDungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void bones( Group group, int from, int to, Callback callback ) {
    MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class ));
    missile.reset( from, to, callback );
    missile.size( 5 );
    missile.pour( Speck.factory(Speck.BONE), 0.02f );
}
 
Example 7
Source File: MagicMissile.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void force( Group group, int from, int to, Callback callback ) {
	MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class ));
	missile.reset( from, to, callback );
	missile.size( 4 );
	missile.pour( ForceParticle.FACTORY, 0.01f );
}
 
Example 8
Source File: MagicMissile.java    From pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void earth( Group group, int from, int to, Callback callback ) {
	MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class ));
	missile.reset( from, to, callback );
	missile.size( 2 );
	missile.pour( EarthParticle.FACTORY, 0.01f );
}
 
Example 9
Source File: MagicMissile.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void ice( Group group, int from, int to, Callback callback ) {
	MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class ));
	missile.reset( from, to, callback );
	missile.size( 2 );
	missile.pour( ColdParticle.FACTORY, 0.01f );
}
 
Example 10
Source File: MagicMissile.java    From pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void foliage( Group group, int from, int to, Callback callback ) {
	MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class ));
	missile.reset( from, to, callback );
	missile.size( 4 );
	missile.pour( LeafParticle.GENERAL, 0.01f );
}
 
Example 11
Source File: MagicMissile.java    From pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void shadow( Group group, int from, int to, Callback callback ) {
	MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class ));
	missile.reset( from, to, callback );
	missile.size( 4 );
	missile.pour( ShadowParticle.MISSILE, 0.01f );
}
 
Example 12
Source File: DoomSkull.java    From YetAnotherPixelDungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void createAtPos( int pos ) {
	Group parent = Dungeon.hero.sprite.parent;
	DoomSkull w = (DoomSkull)parent.recycle( DoomSkull.class );
	parent.bringToFront( w );
	w.reset( pos );
}
 
Example 13
Source File: MagicMissile.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void shadow( Group group, int from, int to, Callback callback ) {
	MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class ));
	missile.reset( from, to, callback );
	missile.size( 4 );
	missile.pour( ShadowParticle.MISSILE, 0.01f );
}
 
Example 14
Source File: MagicMissile.java    From unleashed-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void rainbow( Group group, int from, int to, Callback callback ) {
	MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class ));
	missile.reset( from, to, callback );
	missile.size( 4 );
	missile.pour( RainbowParticle.BURST, 0.01f );
}
 
Example 15
Source File: MagicMissile.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void fire( Group group, int from, int to, Callback callback ) {
	MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class ));
	missile.reset( from, to, callback );
	missile.size( 4 );
	missile.pour( FlameParticle.FACTORY, 0.01f );
}
 
Example 16
Source File: MagicMissile.java    From unleashed-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void whiteLight( Group group, int from, int to, Callback callback ) {
	MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class ));
	missile.reset( from, to, callback );
	missile.size( 4 );
	missile.pour( WhiteParticle.FACTORY, 0.01f );
}
 
Example 17
Source File: MagicMissile.java    From pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void poison( Group group, int from, int to, Callback callback ) {
	MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class ));
	missile.reset( from, to, callback );
	missile.size( 3 );
	missile.pour( PoisonParticle.MISSILE, 0.01f );
}
 
Example 18
Source File: MagicMissile.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void slowness( Group group, int from, int to, Callback callback ) {
	MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class ));
	missile.reset( from, to, callback );
	missile.pour( SlowParticle.FACTORY, 0.01f );
}
 
Example 19
Source File: MagicMissile.java    From YetAnotherPixelDungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void fire( Group group, int from, int to, Callback callback ) {
	MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class ));
	missile.reset( from, to, callback );
	missile.size(4);
	missile.pour( FlameParticle.FACTORY, 0.01f );
}
 
Example 20
Source File: MagicMissile.java    From YetAnotherPixelDungeon with GNU General Public License v3.0 4 votes vote down vote up
public static void blueLight( Group group, int from, int to, Callback callback ) {
	MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class ));
	missile.reset(from, to, callback);
       missile.size( 5 );
	missile.pour( MagicParticle.FACTORY, 0.02f );
}