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
license: cc-by-nc-sa-4.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
using UnityEngine; | |
using System.Collections; | |
using System.Linq; | |
// Place this script on an object in your scene (e.g. the Main Camera) | |
// and run. | |
public class LINQExample: MonoBehaviour { | |
public void Start() { | |
int[] counters = new int[] {0, 1, 2, 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
using UnityEngine; | |
using System.Collections; | |
public class Ball : MonoBehaviour { | |
public float maxHeight; | |
public float minHeight; | |
public float timeToReachMaxHeight; | |
private float jumpVelocity; | |
private float gravity; |
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.Generic; | |
public class MakeDictionaryOfLists : MonoBehaviour { | |
Dictionary<string, List<int>> table = new Dictionary<string, List<int>>(); | |
void Start() { | |
// Fill our table with Lists containing ints using Arrays to intialize | |
// the Lists. | |
table["a"] = new List<int>(){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
#pragma strict | |
import System.Collections.Generic; | |
// White space matters. | |
var table:Dictionary.<String,List.<int> > = new Dictionary.<String,List.<int> >(); | |
// Fill our table with Lists containing ints using Arrays to intialize | |
// the Lists. | |
table["a"] = new List.<int>([1]); | |
table["b"] = new List.<int>([2]); |
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 | |
var size: float; | |
function Awake() { | |
var m: Mesh = CreateBoxMesh(size); | |
var obj: GameObject = CreateGameObject(); | |
// Attach Mesh `m' to the GameObject `obj'. | |
obj.GetComponent(MeshFilter).mesh = m; |
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; | |
using System.Runtime.Serialization.Formatters.Binary; | |
using System.IO; | |
public class GameController: MonoBehaviour { | |
public static GameController control; | |
public int experiencePoints; |
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
<schemes version="1.0"> | |
<scheme name="current"> | |
<binding command="MonoDevelop.Ide.Commands.EditCommands.Copy" shortcut="Alt+W" /> | |
<binding command="MonoDevelop.Ide.Commands.EditCommands.Cut" shortcut="Control+W" /> | |
<binding command="MonoDevelop.Ide.Commands.EditCommands.IndentSelection" shortcut="Control+X|Tab" /> | |
<binding command="MonoDevelop.Ide.Commands.EditCommands.LowercaseSelection" shortcut="Control+X|Control+L" /> | |
<binding command="MonoDevelop.Ide.Commands.EditCommands.Paste" shortcut="Control+Y" /> | |
<binding command="MonoDevelop.Ide.Commands.EditCommands.Redo" shortcut="" /> | |
<binding command="MonoDevelop.Ide.Commands.EditCommands.SelectAll" shortcut="Control+X|H" /> | |
<binding command="MonoDevelop.Ide.Commands.EditCommands.Undo" shortcut="Control+_" /> |