Skip to content

Instantly share code, notes, and snippets.

@joonjoonjoon
joonjoonjoon / gist:8923774
Created February 10, 2014 20:41
time-based solution for framerate drop
class GameClass extends FlxGame
{
private var useCustomFpsCounter:Bool = false;
public function new()
{
// Launch your game here
@joonjoonjoon
joonjoonjoon / sheet.php
Created March 1, 2014 14:46
doPresskit mod: images sort alphabetically (and allow gifs)
<?php
if( file_exists('install.php') )
{
header("Location: install.php");
exit;
}
$game = $_GET['p'];
@joonjoonjoon
joonjoonjoon / PlayStateTestCollision
Last active August 29, 2015 14:01
Weird piling behavior
package ;
import flash.Lib;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.FlxState;
import flixel.group.FlxGroup;
import flixel.util.FlxColor;
class PlayStateTestCollision extends FlxState
@joonjoonjoon
joonjoonjoon / utilities.hx
Created May 28, 2014 16:17
workaround for FlxRandom
private static var seed:Int;
private static var increment:Int;
public static function GetNextSeededRandom():Float
{
increment++;
FlxRandom.globalSeed = seed;
var result:Float = 0;
@joonjoonjoon
joonjoonjoon / MakeAllFilesIntoOne
Last active August 29, 2015 14:03
MakeAllFilesIntoOne VBA script
'ok so open the excel thing that you want to use
'it's probably .xlsx and you need to make it .xlsm
'cause then you can have macros and shit
'now you need to enable developer shit
'First, go into excel options > popular > enable developer tb
'(yeah there's really a tab called 'popular')
'Open Visual Basic
'Insert > Module
'Paste the shit below and hit the play button
@joonjoonjoon
joonjoonjoon / 001 Unity Code Snippets
Last active August 29, 2015 14:05
Unity Code Snippets
This is where we party.
private function InitializeSoundtrack():Void
{
_superMusic = FlxG.sound.play(utilities.Sound.soundtrack, 1, false, false, PlayLoopingPart);
_superMusicLoopPart = FlxG.sound.play(utilities.Sound.soundtrackLoopPart, true);
_superMusic.volume = Globals.musicVolume;
_superMusicLoopPart.volume = Globals.musicVolume;
_superMusicLoopPart.pause();
}
private function PlayLoopingPart():Void
using System;
using Holoville.HOTween.Path;
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof (SomeMonobehavior))]
public class SomeMonobehaviorEditor : Editor
{
public override void OnInspectorGUI()
{
//
// ADBMobile.cs
// Adobe Digital Marketing Suite
// Unity Plug-in v: 4.4.2
//
// Copyright 1996-2015. Adobe, Inc. All Rights Reserved
//
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
LICENSE SYSTEM [2015714 16:2:31] Next license update check is after 2015-06-16T10:43:13
Built from '5.1/patch-release' branch; Version is '5.1.1p4 (c439df19cd24) revision 12859871'; Using compiler version '160040219'
OS: 'Windows 7 Service Pack 1 (6.1.7601) 64bit' Language: 'en' Physical Memory: 8099 MB
BatchMode: 1, IsHumanControllingUs: 0, StartBugReporterOnCrash: 0, Is64bit: 1, IsPro: 1
Initialize mono
Mono path[0] = 'C:/Program Files/Unity_5/Editor/Data/Managed'
Mono path[1] = 'C:/Program Files/Unity_5/Editor/Data/Mono/lib/mono/2.0'
Mono path[2] = 'C:/Program Files/Unity_5/Editor/Data/UnityScript'