This file contains 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
/* | |
* LGVector2D.cpp | |
* | |
* Created by Lee Grey on 11/06/11. | |
* Copyright 2011 Lee Grey. All rights reserved. | |
* | |
*/ | |
#include "LGVector2D.h" | |
#include <iostream> |
This file contains 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
//CLASS: com.lgrey.vectors.LGVector2D | |
//created by Lee Grey | |
package com.lgrey.vectors { | |
import flash.geom.Point; | |
public class LGVector2D { | |
public var x:Number = 0; | |
public var y:Number = 0; |
This file contains 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
// TileWorld.as - Lee Grey, November 2011 | |
package com.lgrey.game.tileEngine | |
{ | |
import com.lgrey.vectors.LGVector2D; | |
import flash.display.BitmapData; | |
public class TileWorld | |
{ | |
protected var _worldMap:BitmapData; |
This file contains 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
/* | |
* Copyright (c) 2009 Michael Baczynski, http://www.polygonal.de | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to | |
* permit persons to whom the Software is furnished to do so, subject to | |
* the following conditions: |
This file contains 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
// Seeded Perlin Noise | |
// | |
// Based on the original by Ken Perlin: | |
// | |
// http://mrl.nyu.edu/~perlin/noise/ | |
// http://mrl.nyu.edu/~perlin/paper445.pdf | |
// | |
// Seeding function based on code from: | |
// http://techcraft.codeplex.com/discussions/264014 | |
// |
This file contains 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
/* | |
SignalHub: | |
Created on Sat 15th Sep, 2012 | |
by Lee Grey | |
SignalHub solves the problem of object-creation order by using lazy initialisation - whoever | |
makes the first request for a Signal with a given key will bring about it's creation. |
This file contains 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
/* | |
Inherit copyright 2012 by Lee Grey | |
license: MIT | |
http://creativecommons.org/licenses/MIT/ | |
http://opensource.org/licenses/mit-license.php | |
The goal of the Interit class is to allow for a prototype based inheritance that | |
does not create a deep prototype chain. Inherited fields are known to be slow, | |
so methods and fields are simply copied onto the prototype of the target, | |
keeping only a single depth. |
This file contains 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
SECOND FILE | |
# H1 | |
followed by some text | |
## H2 | |
followed by some text | |
### H3 | |
followed by some text |
This file contains 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
/* | |
Author: Lee Grey, 2012 | |
License: MIT | |
USAGE: | |
var A = InheritMax.base( { | |
name: 'A', | |
say: function () { | |
console.log( 'A speaks' ); |
This file contains 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
// Copyright Lee Grey, 2014 | |
// License: MIT | |
module lg.tileSystem { | |
import Vector2D = lg.math.geometry.Vector2D; | |
export class FieldInfo { | |
distanceFromTarget: number = -1; |
OlderNewer