Skip to content

Instantly share code, notes, and snippets.

Corey Wolff jesterswilde

Block or report user

Report or block jesterswilde

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jesterswilde
jesterswilde / SpriteSheetRenderer.ms
Created Feb 8, 2015
Renders a sprite sheet from 3DS Max and kicks it to Unity
View SpriteSheetRenderer.ms
--Sprite Sheet Renderer by Corey Wolff
--Currently this is setup to use automatically spit out a sprite sheet to a specific location based on the
--CreateProject and CreateAsset script I made. It also wants to then have Unity chop up the sprite sheet.
--If people are intersted I could modify this to be a more generic version.
studioLib()
drvLibGame()
@jesterswilde
jesterswilde / js
Created Sep 14, 2015
nQuees with Comments
View js
findNQueens = function(nSize){
//make an array, and fill it with ordered numbers to n
var rows = [];
// rows will have 0 - n pushed to it, non inclusive
for (var i = 0; i < n; i++){
rows.push(i);
}
// final array that gets returned
var results = [];
// storage for what we currently have
@jesterswilde
jesterswilde / itemComponent
Last active Mar 28, 2018
A code sample from a mobile app
View itemComponent
//Item
import { h } from 'preact';
import { appMethodsToProps } from '../appData';
import { classNames } from '../../util';
export default appMethodsToProps(({ clickOnItem, index, itemName, cost, selected, alreadyPaid })=> (
<button
onClick={ ()=>clickOnItem(index) }
disabled={alreadyPaid}
View Physics
const _ = (window)? window._ : require('underscore');
const {sum} = (window)? window.util : require('./Util');
const checkBounds = (body, world)=>{
let {position:[posX, posY], extents: [extX, extY]} = body;
let {boundsMinX: minX, boundsMinY: minY, boundsMaxX: maxX, boundsMaxY: maxY} = world;
if((posX - extX) < minX){
onCollision(body, null,{
axis: 0,
offset: -(posX - extX - minX)
View Room
module.exports = (io)=>{
let roomID = 0;
let rooms = [];
let createRoom = function(id){
roomID++;
let room = {
isFull: function(){ return this.sockets.length >= this.capacity;},
capacity: 2,
sockets: [],
id : roomID,
View functionInjection.js
const transformData = dataArray =>{
//transforms the data in some way
}
const dataToObj = dataArray =>{
//converts the data to a new form
}
//The final object will be an object that contains all dependencies in this file.
@jesterswilde
jesterswilde / Action.cs
Created Dec 17, 2018
Time TraveL Action Class
View Action.cs
public class Action
{
System.Object value;
public System.Object Value { get { return value; } }
ActionEnum type;
public ActionEnum Type { get { return type; } }
ITimed timed;
public ITimed Timed{get{return timed;}}
public Action(ITimed timedObj, ActionEnum actionEnum, System.Object valueToStore = null){
View ActionEnum.cs
public enum ActionEnum
{
PressForward,
ReleaseForward,
PressRight,
ReleaseRight,
PressBack,
ReleaseBack,
PressLeft,
View ITimed.cs
public interface ITimed
{
TimedState Serialize();
void Hydrate(SeriealizedState state);
void Play(float time);
void ProcessAction(Action action);
}
View Timeline.cs
public class Timeline
{
int currentFrame = 0;
public int CurrentFrame
{
get { return currentFrame; }
set { currentFrame = value; }
}
You can’t perform that action at this time.