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
// GameMaster.cs *** | |
using UnityEngine; | |
using System.Collections; | |
public class GameMaster : MonoBehaviour { | |
public GameObject whiteAnt; | |
// Use this for initialization |
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
// Running project : https://www.dropbox.com/s/zs1i64zviep4i4h/Collider.zip?dl=0 | |
using UnityEngine; | |
using System.Collections; | |
public class LoseCollider : MonoBehaviour { | |
void OnTriggerEnter2D (Collider2D trigger) { | |
print ("trigger " + trigger); | |
} |
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
// Unity project here: https://www.dropbox.com/s/8nsuolthw2dzv4b/My%20Second%20Game%20Attempt.zip?dl=0 | |
using UnityEngine; | |
using UnityEngine.UI; | |
using System.Collections; | |
public class Work : MonoBehaviour { | |
public Text 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
using UnityEngine; | |
using UnityEngine.UI; | |
using System.Collections; | |
public class TextController : MonoBehaviour { | |
public Text text; | |
private enum States {cell, sheets_0, sheets_1, lock_0, lock_1, mirror, cell_mirror, freedom}; | |
private States myState; | |
// Use this for initialization | |
void Start () { | |
myState = States.cell; |
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 UnityEngine.UI; // brings in UI information | |
public class TextController : MonoBehaviour { | |
public Text text; // requires UnityEngine.UI, publicly exposes the text | |
// Use this for initialization | |
void Start () { |
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 NumberWizards : MonoBehaviour { | |
int max = 1000; | |
int min = 1; | |
int guess = 500; | |
// Use this for initialization |
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 NumberWizards : MonoBehaviour { | |
int max = 1000; | |
int min = 1; | |
int guess = 500; | |
// Use this for initialization |
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
// Don't forget to set capabilities to iCloud on, Cloudkit | |
import UIKit | |
import CloudKit | |
class ViewController: UIViewController { | |
let database = CKContainer.defaultContainer().privateCloudDatabase | |
enum CarType: 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
import UIKit | |
import AVFoundation | |
var player: AVQueuePlayer! | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() |
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 with callback | |
var getPayerIDs = function(db, callback) { | |
console.log("is db null?:" + (db == null)); | |
var condition = new Object(); | |
condition.iap_status = "success"; | |
condition.receipt = {$in: [/^129/, /GPA./]}; | |
db.collection('android_uc_iap').distinct("device_id", condition, function (err, docs) { | |
callback(docs); | |
}); |