Skip to content

Instantly share code, notes, and snippets.

View JoshEngebretson's full-sized avatar

JoshEngebretson

  • North Carolina, USA
View GitHub Profile
package tec.example {
import System.Console;
public class BaseClass {
public var message:String = "Hello!";
public var amount:Number = 10;
public function initialize(amt:Number, msg:String)
@JoshEngebretson
JoshEngebretson / AutoHotKeyOSX
Last active September 23, 2016 17:54
AutoHotKey, make WIndows act like OSX
;-----------------------------------------
; Mac keyboard to Windows Key Mappings
;=========================================
; --------------------------------------------------------------
; NOTES
; --------------------------------------------------------------
; ! = ALT
; <^>! = RIGHT ALT
; ^ = CTRL
package
{
import loom.Application;
import loom2d.display.StageScaleMode;
import loom2d.display.Image;
import loom2d.textures.Texture;
import loom2d.ui.SimpleLabel;
import loom2d.events.Touch;
import loom2d.events.TouchEvent;
import loom2d.events.TouchPhase;
static int update(lua_State *L)
{
static int gcBackOff = 0;
static int gcLastTime = 0;
// start of GC calculations
int startTime = platform_getMilliseconds();
// the delta
int delta = startTime - gcLastTime;
@JoshEngebretson
JoshEngebretson / gist:7667114
Created November 26, 2013 22:02
Pausing TimeManager, Timer based on losing/gaining focus
package
{
import loom.platform.Timer;
import loom.gameframework.LoomGroup;
import loom.gameframework.TimeManager;
import loom.gameframework.ITicked;
import loom.Application;
import loom2d.events.Event;

How to catch Object Leaks in Loom

First, start your application normally with:

loom run

then at the command console enter:

profilerEnable

using UnityEngine;
using UWK;
public class WebGUI : MonoBehaviour
{
// The position of the gui on the screen
public Vector2 Position;
@JoshEngebretson
JoshEngebretson / gist:43f9fa09b462da31e4c9
Last active August 29, 2015 14:13
Atomic Javascript API (TypeScript Edition)
//Atomic TypeScript Definitions
declare module Atomic {
export enum InterpolationMode {
BEZIER_CURVE
}
//Atomic JSDoc Definitions
/**
* Atomic Game Engine
* @namespace
*/
var Atomic = {}
/**
@JoshEngebretson
JoshEngebretson / gist:400ba50d85481ae973bd
Created April 17, 2015 17:55
Example controller script
function doShooting(timeStep)
{
if (self.shootDelta > 0) {
self.shootDelta -= timeStep;
if (self.shootDelta < 0)
self.shootDelta = 0;
return;
}