This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.badlogic.gdx.graphics.g2d.Sprite; | |
| /** | |
| * @author tedigc | |
| * @since 8-04-2016 | |
| */ | |
| public class Animation { | |
| private Sprite[] frames; | |
| private int currentFrame; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Pair<L,R> { | |
| private final L left; | |
| private final R right; | |
| public Pair(L left, R right) { | |
| this.left = left; | |
| this.right = right; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.badlogic.gdx.assets.AssetManager; | |
| import com.badlogic.gdx.graphics.Texture; | |
| import com.badlogic.gdx.graphics.g2d.TextureRegion; | |
| /** | |
| * @author brokenbeach | |
| * @since 12/09/2016 | |
| */ | |
| public class SpriteSheet { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifdef GL_ES | |
| precision mediump float; | |
| #endif | |
| varying vec4 v_color; | |
| varying vec2 v_texCoords; | |
| uniform sampler2D u_texture; | |
| uniform mat4 u_projTrans; | |
| void main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Timer { | |
| private int delay; | |
| private int elapsed; | |
| private boolean running; | |
| public Timer(int delay, boolean running) { | |
| this.delay = delay; | |
| this.running = running; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- On the command line -- | |
| ln -s /usr/local/Cellar/opencv/2.4.12/lib/python2.7/site-packages/cv.py cv.py | |
| ln -s /usr/local/Cellar/opencv/2.4.12/lib/python2.7/site-packages/cv2.so cv2.so | |
| -- In a .py file -- | |
| os.link('/usr/local/Cellar/opencv/2.4.12/lib/python2.7/site-packages/cv.py', 'opencv/cv') | |
| os.link('/usr/local/Cellar/opencv/2.4.12/lib/python2.7/site-packages/cv2.so', 'opencv/cv2') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Generate a random convex polygon by dividing a circle's circumference into regions and connecting points | |
| * randomly selected from each region. | |
| * | |
| * @param nPoints the number of points the polygon will have | |
| * @param radius the radius of the circle used to generate the polygon | |
| */ | |
| protected void defineHitbox(int nPoints, float radius) { | |
| // calculate the size of the arc regions around the circle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.badlogic.gdx.graphics.Color; | |
| /** | |
| * All of the colours from @ENDESGA's edg32 palette, in order of hue | |
| */ | |
| public class Palette { | |
| static final public Color WHITE = define(255, 255, 255); | |
| static final public Color PINE = define(116, 63, 57); | |
| static final public Color TETANUS = define(190, 74, 47); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static public ArrayList<Vector2> line(Vector2 v1, Vector2 v2) { | |
| int x = (int) v1.x; | |
| int y = (int) v1.y; | |
| int x2 = (int) v2.x; | |
| int y2 = (int) v2.y; | |
| ArrayList<Vector2> result = new ArrayList<Vector2>(); | |
| int w = x2 - x ; | |
| int h = y2 - y ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.halfcut.galaxygarden.client; | |
| import com.badlogic.gdx.ApplicationListener; | |
| import com.badlogic.gdx.Gdx; | |
| import com.badlogic.gdx.backends.gwt.GwtApplication; | |
| import com.badlogic.gdx.backends.gwt.GwtApplicationConfiguration; | |
| import com.badlogic.gdx.backends.gwt.preloader.Preloader; | |
| import com.badlogic.gdx.graphics.Pixmap; | |
| import com.google.gwt.canvas.client.Canvas; | |
| import com.google.gwt.canvas.dom.client.Context2d; |
OlderNewer