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
// Simple quit and escape functionality | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
// First, add this... | |
using UnityEngine.SceneManagement; | |
public class QuitAndReset : MonoBehaviour |
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
// This requires Adafruit's Pro Trinket Keyboard library | |
#include <ProTrinketKeyboard.h> | |
// Array to hold keypresses. | |
uint8_t pressedKeys[9]; | |
void setup() { | |
// Each pin uses internal pullup resistors | |
pinMode(3, INPUT_PULLUP); | |
pinMode(4, INPUT_PULLUP); |
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
// 3 button keyboard emulator for the 5V Adafruit Trinket. | |
// Requires the Trinket Keyboard Library from Adafruit (https://github.com/adafruit/Adafruit-Trinket-USB/archive/master.zip) | |
#include <TrinketKeyboard.h> | |
// Array to hold keypresses. Trinket can emulate 3 simultaneously pressed keys | |
uint8_t pressedKeys[3]; | |
void setup() { | |
// Each pin* uses internal pullup resistors |
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
// Unity C# Cheat Sheet | |
// I made these examples for students with prior exerience working with C# and Unity. | |
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting |
NewerOlder