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 MyFirstScreen implements Screen { | |
private Game game; | |
public MyFirstScreen(Game game) { | |
this.game = game; | |
} | |
} |
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
//assume you defined the following: | |
Player player = new Player() | |
//and player has a method called player.revive() | |
// | |
Timer.scheduleTask(new CallableTask<Player>(player) { | |
@Override | |
public void run() { | |
caller.revive(); |
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.badlogic.gdx.utils; | |
import com.badlogic.gdx.utils.Timer.Task; | |
public abstract class CallableTask<T> extends Task { | |
protected T caller; | |
public CallableTask(T caller) { | |
this.caller = caller; |
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 static final void initGdx() { | |
GdxNativesLoader.load(); | |
Gdx.graphics = mock(Graphics.class); | |
Gdx.audio = mock(Audio.class); | |
Gdx.gl = mock(GLCommon.class); | |
Gdx.gl10 = mock(GL10.class); | |
Gdx.gl11 = mock(GL11.class); | |
Gdx.gl20 = mock(GL20.class); | |
Gdx.input = mock(Input.class); | |
} |
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
running = true | |
while running do | |
print("press h") | |
local input = io.read() | |
if input=="h" then | |
dofile("dofileExampleEditable.lua") | |
end | |
end |
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.projecthawkthorne.server.nodes; | |
import com.badlogic.gdx.graphics.g2d.tiled.TiledObject; | |
import com.projecthawkthorne.gamestate.Level; | |
public class Hippy extends Enemy { | |
public Hippy(TiledObject obj, Level level) { | |
super(obj, level); | |
this.width = 48; |
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
local socket = require "socket" | |
require 'vendor/lube' | |
local Player = require 'player_server' | |
local Level = require 'level_server' | |
local Gamestate = require 'vendor/gamestate' | |
-- begin | |
local udp = socket.udp() |
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
getting an up-to-date upstream: | |
git checkout master | |
git pull upstream master | |
git push origin master | |
making a new branch called 'new_branch_name': | |
git checkout master | |
git checkout -b new_branch_name | |
switching to an existing branch called 'some_branch_name': |
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
Big Poppa(derferman) | |
Development Sprites Sounds | |
derferman edisonout boobatron2000 | |
jhoff |
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
update = function( dt, enemy, player, level ) | |
--if player is close to me(the jive turkey) | |
local node = require('nodes/enemies'..name) | |
local spawnedTurkey = Enemy.new(node, enemy.collider, name) | |
local level = ... GS.something I forget | |
table.insert( level.nodes, mynode.new( refnode, collider )spawnedTurkey ) | |
end |
NewerOlder