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
| // The MIT License (MIT) | |
| // Copyright (c) 2016 David Evans @phosphoer | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
| // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR |
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 class Bullet : PoolObject { | |
| Rigidbody myRigidbody; | |
| public override void OnAwake() { | |
| if (myRigidbody == null) { | |
| myRigidbody = GetComponent<Rigidbody> (); |
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 Colors | |
| { | |
| // NOTE: The follwing color names come from the CSS3 specification, Section 4.3 Extended Color Keywords | |
| // http://www.w3.org/TR/css3-color/#svg-color | |
| public static readonly Color AliceBlue = new Color32(240,248,255,255); | |
| public static readonly Color AntiqueWhite = new Color32(250,235,215,255); | |
| public static readonly Color Aqua= new Color32(0,255,255,255); |
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
| /************************************************************ | |
| * Better Singleton by David Darias | |
| * Use as you like - credit where due would be appreciated :D | |
| * Licence: WTFPL V2, Dec 2014 | |
| * Tested on Unity v5.6.0 (should work on earlier versions) | |
| * 03/02/2017 - v1.1 | |
| * **********************************************************/ | |
| using System; | |
| using UnityEngine; |
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 GyroCamera : MonoBehaviour | |
| { | |
| // STATE | |
| private float _initialYAngle = 0f; | |
| private float _appliedGyroYAngle = 0f; | |
| private float _calibrationYAngle = 0f; | |
| private Transform _rawGyroRotation; |
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
| /* | |
| Send and receive OSC messages between NodeMCU and another OSC speaking device. | |
| Send Case: Press a physical button (connected to NodeMCU) and get informed about it on your smartphone screen | |
| Receive Case: Switch an LED (connected to NodeMCU) on or off via Smartphone | |
| Written by Jackson Campbell <jcampbell@calarts.edu> | |
| Modified by Donovan Keith <dkeith@calarts.edu> | |
| for [Augmenting Realities](https://sites.google.com/view/augmentingrealities/home) | |
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
| // A simple Unity example script that makes a UI component track position of world space object rendered with | |
| // specific world space camera. Canvas needs to be in Screen Space Camera mode. | |
| [ExecuteInEditMode] | |
| public class UIFollow : MonoBehaviour | |
| { | |
| [Tooltip("World space object to follow")] | |
| public GameObject target; | |
| [Tooltip("World space camera that renders the target")] | |
| public Camera worldCamera; | |
| [Tooltip("Canvas set in Screen Space Camera mode")] |
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 UnityEngine.UI; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| /// <summary> | |
| /// Add this component to your Cinemachine Virtual Camera to have it shake when calling its ShakeCamera methods. | |
| /// </summary> | |
| public class CinemachineCameraShaker : 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
| // Put this in an editor folder | |
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEditor; | |
| using UnityEngine; | |
| using UnityEngine.Experimental.LowLevel; | |
| using UnityEngine.Profiling; |