This file contains hidden or 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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public interface Command { | |
void Execute(); | |
} | |
public class Jump : Command { | |
string messageToLog; |
This file contains hidden or 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 MouseOrbitAndZoom : MonoBehaviour { | |
public Transform target; | |
public float distance = 10f; | |
public float xSpeed = 250f; | |
public float ySpeed = 120f; |
This file contains hidden or 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
public static List<int> ScoreFrames(List<int> rolls) { | |
List<int> frameList = new List<int>(); | |
int rollNumber = 0; | |
int currentFrame = 0; | |
int rollsRemainingInFrame = 2; | |
foreach (int roll in rolls) if (frameList.Count < 10) { | |
rollNumber++; | |
rollsRemainingInFrame--; |
This file contains hidden or 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 named(){ | |
(function(){ | |
this.foo = function() { | |
alert('bar'); | |
} | |
})(); | |
} | |
named.foo(); |
This file contains hidden or 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
<html> | |
<head> | |
<title>Test Suite</title> | |
<script> | |
(function() { | |
var queue = [], paused = false, results; | |
this.test = function(name, fn) { | |
queue.push(function() { | |
results = document.getElementById('results'); | |
results = assert(true, name).appendChild(document.createElement('ul')); |
This file contains hidden or 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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
<script src="/socket.io/socket.io.js"></script> | |
<script> | |
$(document).ready(function() { | |
var socket = io.connect('http://localhost'); | |
$('#button').click(function(e){ | |
socket.emit('click'); | |
e.preventDefault(); |