com.watabou.noosa.Visual Java Examples
The following examples show how to use
com.watabou.noosa.Visual.
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: RingOfWealth.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 6 votes |
public static void showFlareForBonusDrop( Visual vis ){ switch (latestDropTier){ default: break; //do nothing case 1: new Flare(6, 20).color(0x00FF00, true).show(vis, 3f); break; case 2: new Flare(6, 24).color(0x00AAFF, true).show(vis, 3.33f); break; case 3: new Flare(6, 28).color(0xAA00FF, true).show(vis, 3.67f); break; case 4: new Flare(6, 32).color(0xFFAA00, true).show(vis, 4f); break; } latestDropTier = 0; }
Example #2
Source File: JumpTweener.java From remixed-dungeon with GNU General Public License v3.0 | 5 votes |
public JumpTweener(Visual visual, PointF pos, float height, float time) { super(visual, time); this.visual = visual; start = visual.point(); end = pos; this.height = height; }
Example #3
Source File: Flare.java From unleashed-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
public Flare show( Visual visual, float duration ) { point( visual.center() ); visual.parent.addToBack( this ); lifespan = this.duration = duration; return this; }
Example #4
Source File: CharSprite.java From pixel-dungeon with GNU General Public License v3.0 | 5 votes |
public JumpTweener( Visual visual, PointF pos, float height, float time ) { super( visual, time ); this.visual = visual; start = visual.point(); end = pos; this.height = height; }
Example #5
Source File: Flare.java From pixel-dungeon with GNU General Public License v3.0 | 5 votes |
public Flare show( Visual visual, float duration ) { point( visual.center() ); visual.parent.addToBack( this ); lifespan = this.duration = duration; return this; }
Example #6
Source File: CharSprite.java From unleashed-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
public JumpTweener( Visual visual, PointF pos, float height, float time ) { super( visual, time ); this.visual = visual; start = visual.point(); end = pos; this.height = height; }
Example #7
Source File: PosTweener.java From YetAnotherPixelDungeon with GNU General Public License v3.0 | 5 votes |
public PosTweener( Visual visual, PointF pos, float time ) { super( visual, time ); this.visual = visual; start = visual.point(); end = pos; }
Example #8
Source File: PosTweener.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
public PosTweener( Visual visual, PointF pos, float time ) { super( visual, time ); this.visual = visual; start = visual.point(); end = pos; }
Example #9
Source File: ScaleTweener.java From YetAnotherPixelDungeon with GNU General Public License v3.0 | 5 votes |
public ScaleTweener( Visual visual, PointF scale, float time ) { super( visual, time ); this.visual = visual; start = visual.scale; end = scale; }
Example #10
Source File: ScaleTweener.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
public ScaleTweener( Visual visual, PointF scale, float time ) { super( visual, time ); this.visual = visual; start = visual.scale; end = scale; }
Example #11
Source File: MagicMissile.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
public static MagicMissile boltFromChar(Group group, int type, Visual sprite, int to, Callback callback){ MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class )); if (Actor.findChar(to) != null){ missile.reset(type, sprite.center(), Actor.findChar(to).sprite.destinationCenter(), callback); } else { missile.reset(type, sprite, to, callback); } return missile; }
Example #12
Source File: CircleArc.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
public CircleArc show( Visual visual, float duration ) { point( visual.center() ); visual.parent.addToBack( this ); lifespan = this.duration = duration; return this; }
Example #13
Source File: Flare.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
public Flare show( Visual visual, float duration ) { point( visual.center() ); visual.parent.addToBack( this ); lifespan = this.duration = duration; if (lifespan > 0) scale.set( 0 ); return this; }
Example #14
Source File: AlphaTweener.java From remixed-dungeon with GNU General Public License v3.0 | 5 votes |
public AlphaTweener( Visual image, float alpha, float time ) { super( image, time ); this.image = image; start = image.alpha(); delta = alpha - start; }
Example #15
Source File: ScaleTweener.java From remixed-dungeon with GNU General Public License v3.0 | 5 votes |
public ScaleTweener( Visual visual, PointF scale, float time ) { super( visual, time ); this.visual = visual; start = visual.Scale(); end = scale; }
Example #16
Source File: ZapEffect.java From remixed-dungeon with GNU General Public License v3.0 | 5 votes |
private static void attachMissileTeenier(Visual target, int from, int to) { target.point( DungeonTilemap.tileToWorld( from ) ); PointF dest = DungeonTilemap.tileToWorld( to ); PointF d = PointF.diff( dest, target.point() ); target.speed.set( d ).normalize().scale(SPEED ); target.angularSpeed = 0; target.angle = (float) (135 - Math.toDegrees(Math.atan2( d.x, d.y ))); PosTweener tweener = new PosTweener( target, dest, d.length() / SPEED ); tweener.listener = tweener1 -> target.killAndErase(); target.getParent().add( tweener ); }
Example #17
Source File: PosTweener.java From remixed-dungeon with GNU General Public License v3.0 | 5 votes |
public PosTweener( Visual visual, float dx, float dy, float time ) { super( visual, time ); this.visual = visual; start = visual.point(); end = start.clone(); end.offset(dx,dy); }
Example #18
Source File: PosTweener.java From remixed-dungeon with GNU General Public License v3.0 | 5 votes |
public PosTweener( Visual visual, PointF pos, float time ) { super( visual, time ); this.visual = visual; start = visual.point(); end = pos; }
Example #19
Source File: GameLog.java From remixed-dungeon with GNU General Public License v3.0 | 5 votes |
@Override protected void layout() { float pos = y; for (int i = getLength() -1; i >= 0; i--) { Visual entry = (Visual) members.get( i ); if(entry instanceof Text) { entry.x = x; entry.y = pos - entry.height(); pos = entry.y; } } }
Example #20
Source File: Flare.java From remixed-dungeon with GNU General Public License v3.0 | 5 votes |
public Flare show( Visual visual, float duration ) { point( visual.center() ); visual.getParent().addToBack( this ); lifespan = this.duration = duration; return this; }
Example #21
Source File: AlphaTweener.java From PD-classes with GNU General Public License v3.0 | 5 votes |
public AlphaTweener( Visual image, float alpha, float time ) { super( image, time ); this.image = image; start = image.alpha(); delta = alpha - start; }
Example #22
Source File: ScaleTweener.java From PD-classes with GNU General Public License v3.0 | 5 votes |
public ScaleTweener( Visual visual, PointF scale, float time ) { super( visual, time ); this.visual = visual; start = visual.scale; end = scale; }
Example #23
Source File: PosTweener.java From PD-classes with GNU General Public License v3.0 | 5 votes |
public PosTweener( Visual visual, PointF pos, float time ) { super( visual, time ); this.visual = visual; start = visual.point(); end = pos; }
Example #24
Source File: AlphaTweener.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
public AlphaTweener( Visual image, float alpha, float time ) { super( image, time ); this.image = image; start = image.alpha(); delta = alpha - start; }
Example #25
Source File: ScaleTweener.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
public ScaleTweener( Visual visual, PointF scale, float time ) { super( visual, time ); this.visual = visual; start = visual.scale; end = scale; }
Example #26
Source File: PosTweener.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
public PosTweener( Visual visual, PointF pos, float time ) { super( visual, time ); this.visual = visual; start = visual.point(); end = pos; }
Example #27
Source File: CharSprite.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
public JumpTweener( Visual visual, PointF pos, float height, float time ) { super( visual, time ); this.visual = visual; start = visual.point(); end = pos; this.height = height; }
Example #28
Source File: MagicMissile.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
public static MagicMissile boltFromChar(Group group, int type, Visual sprite, int to, Callback callback){ MagicMissile missile = ((MagicMissile)group.recycle( MagicMissile.class )); if (Actor.findChar(to) != null){ missile.reset(type, sprite.center(), Actor.findChar(to).sprite.destinationCenter(), callback); } else { missile.reset(type, sprite, to, callback); } return missile; }
Example #29
Source File: CircleArc.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
public CircleArc show( Visual visual, float duration ) { point( visual.center() ); visual.parent.addToBack( this ); lifespan = this.duration = duration; return this; }
Example #30
Source File: Flare.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
public Flare show( Visual visual, float duration ) { point( visual.center() ); visual.parent.addToBack( this ); lifespan = this.duration = duration; if (lifespan > 0) scale.set( 0 ); return this; }