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
#!/usr/bin/python | |
import os, sys | |
from xml.dom import minidom | |
#-------------------------------------- | |
BASE_PATH = os.path.dirname(__file__) | |
MAP_SRC_DIR = os.path.join(BASE_PATH, 'data/maps') | |
MAP_COMPILED_DIR = os.path.join(BASE_PATH, 'data/maps/compiled') |
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
// InfiniteOutsideState.as | |
package beulah { | |
import org.flixel.*; | |
public class InfiniteOutsideState extends FlxState { | |
private var worldChunks:FlxGroup; | |
private var worldChunkMap:Object; | |
private var currentWorld:Object; |
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 beulah { | |
import org.flixel.*; | |
public class Background extends FlxGroup { | |
private var cloudsOne:FlxSprite; | |
private var cloudsTwo:FlxSprite; | |
private var landOne:FlxSprite; | |
private var landTwo:FlxSprite; | |
private var screenTestPoint:FlxPoint; | |
private var season:String; |
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
#pragma strict | |
#pragma downcast | |
class SpeakingCharacter extends MonoBehaviour { | |
// ------------------------------------------ | |
// Properties | |
// ------------------------------------------ | |
public var characterName : String; | |
public var conversationXMLFile : TextAsset; |
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
void setup() { | |
// Fetch recent tweets from twitter with a certain keyword | |
XMLElement xml = new XMLElement(this, "http://search.twitter.com/search.atom?q=lasertag"); | |
XMLElement[] tweets = xml.getChildren("entry/title"); | |
String corpus = ""; | |
for(int i=0; i<tweets.length; i++) { | |
corpus += tweets[i].getContent(); | |
} |
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
ArrayList imageList; | |
int currentImageIndex = 0; | |
ArrayList fetchNewImages(String keyword) { | |
XMLElement xml = new XMLElement(this, "http://api.flickr.com/services/feeds/photos_public.gne?tags=" + keyword + "&lang=en-us&format=rss_200"); | |
XMLElement[] linkTags = xml.getChildren("entry/link"); | |
ArrayList imageList = new ArrayList(); |
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
using UnityEngine; | |
public class GoogleAnalytics { | |
public static string gameIdentifier = "YourGameName"; | |
public static void TrackEvent(string eventName, string eventLabel="") { | |
string googleAnalyticsCall = "_gaq.push(['_trackEvent', '" + GoogleAnalytics.gameIdentifier + "', '" + eventName + "'"; | |
if(eventLabel != "") { | |
googleAnalyticsCall += ", '" + eventLabel + "'"; |
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
using UnityEngine; | |
using System.Collections; | |
public class TitleScreenAnalyticsEvents : MonoBehaviour { | |
void Start () { | |
GoogleAnalytics.TrackEvent("start_level", "title_screen"); | |
} | |
} |
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
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class PlaytimeTracker : MonoBehaviour { | |
public int heartbeatCount = 0; | |
void Awake() { | |
DontDestroyOnLoad(gameObject); | |
} |
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
using UnityEngine; | |
using System.Collections; | |
public class EventsTest : MonoBehaviour { | |
void Start () { | |
EventManager.AddEventListener("test-event", delegate() { | |
Debug.Log("Test event was triggered!"); | |
}); | |
StartCoroutine(TriggerTestEvent()); |
OlderNewer