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
#!/usr/bin/env python | |
# Authors: Viktor Holmgren (holmgr), Alexander Sääf (alexsaaf) | |
from pynput import keyboard | |
import colorsys | |
import time | |
import sys | |
import numpy | |
import unicornhat as unicorn |
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.Generic; | |
using UnityEngine; | |
public class LaserHandler : MonoBehaviour { | |
public Transform laserHolder; | |
public GameObject laserPrefab; | |
public int numberOfLasers = 20; | |
public int laserRange = 10; |
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; | |
public class MusicPlayer : MonoBehaviour { | |
public static MusicPlayer instance = null; | |
public AudioClip[] tracks; | |
private int currentTrack; |
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; | |
//This component wont work without a rigidbody | |
[RequireComponent(typeof(Rigidbody))] | |
public class SphereController : MonoBehaviour { | |
//We mask ourselves out with this layermask | |
public LayerMask mask; | |
[Tooltip("The distance raycasts are sent out")] | |
public float maxDistance; |
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; | |
/// <summary> | |
/// Script that switches the color of an object to a random color. | |
/// Does not produce very pretty colors, but if you want completely | |
/// random colors they wont be. | |
/// </summary> | |
[RequireComponent(typeof(MeshRenderer))] | |
public class ColorRandomizer : 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
using UnityEngine; | |
/// <summary> | |
/// Basic camera controller script which follows its | |
/// target around with dampening. | |
/// | |
/// If the dampTime is too high it may not be able to keep | |
/// up with the target, meaning the target will leave the screen | |
/// </summary> | |
public class CameraController : MonoBehaviour { |