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
CREATE VIEW view_recipe_by_ingredient AS | |
SELECT R.id, R.name, RI.liquorID | |
FROM recipes R | |
JOIN recipeIngredients RI ON RI.recipeID = R.id; | |
CREATE VIEW view_recipes_in_cabinet AS | |
SELECT L.userID, RbI.name, RbI.id, COUNT( RbI.liquorID ) as LiquorCount | |
FROM view_recipe_by_ingredient RbI | |
LEFT JOIN liquorCabinet L USING (liquorID) | |
GROUP BY RbI.name; |
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
GOAL: | |
To create a database of liquor in your liquor cabinet, and a database of possible drinks to make. | |
Output: | |
(1) a list of drinks you can make with your existing liquors, (hard!) and | |
(2) a list of drinks you could make if you just bought a few more things | |
=== |
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
private var scaleAmount:Float; | |
private var overrideTween:Bool; | |
public function bubbleOnMouseOver(scaleAmount:Float = 1.2, overrideTween:Bool = true):Void { | |
//trace("WSprite's bubbleOnMouseOver is broken with Actuate. Disabled."); | |
//return; | |
this.overrideTween = overrideTween; | |
this.scaleAmount = scaleAmount; | |
addEventListener(MouseEvent.MOUSE_OVER, mouseOverGrow); | |
} |
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
protected static var _lumR:Number = 0.212671; | |
protected static var _lumG:Number = 0.715160; | |
protected static var _lumB:Number = 0.072169; | |
public function ColorManip() { } | |
static public function colorize(color:Number, amount:Number = 1):Array { | |
if (isNaN(amount)) { | |
amount = 1; | |
} |
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
path = new MotionPath(); | |
for (tile in currentSelection) { | |
path = path.bezier(tile.centerX, tile.centerY, tile.centerX, tile.centerY); | |
} | |
Actuate.tween(this, time, { x:path.x, y:path.y }, true); |
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
function onStageResize(e:Event) { | |
// Not pictured: backdrop is a Sprite that has .addChild(new Bitmap()) graphics contained. | |
// Using Haxe3 + openFL 1.0 | |
if (stage.stageWidth > stage.stageHeight) { | |
// This always works: | |
backdrop.rotation = 0; | |
backdrop.x = 0; | |
backdrop.y = 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
package ; | |
using irl.SaveData; | |
class MySaveData { | |
static inline var myVar = "HELLO"; | |
} |
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
var s:Sprite; | |
function show() { | |
s = new Sprite(); | |
addChild(new Bitmap(Assets.getBitmapData("sadTrombone.png"))); | |
} | |
function kill() { | |
removeChild(s); | |
s = null; |
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
actuate: [1.7.0] | |
format: [3.0.4] | |
haxe-ga: [0.4.1] | |
hxlibc: [1.0.0] | |
hxtools: 1.1.2 1.1.3 [1.1.5] | |
irl: git [dev:/usr/lib/haxe/lib/irl/git] | |
msignal: [1.2.2] | |
openfl: [1.1.0] | |
openfl-html5-dom: [1.1.0] | |
openfl-native: 1.1.0 1.1.1 [1.1.3] |
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
import project.*; | |
class Project extends HXProject { | |
public function new () { | |
super (); | |
meta = { title: "Monster Loves You!", packageName: "com.radialgames.MonsterLovesYou", version: "0.99.1", company: "Radial Games Corp." }; | |
app = { main: "Main", path: "bin", file: "MonsterLovesYou" }; | |
#if mobile |
OlderNewer