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 windController : MonoBehaviour { | |
//TODO | |
//1) Inwards / Outwards Direction | |
float t; | |
int direction = 1; //Direction of rotation the wind object makes |
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; | |
/// <summary> | |
/// PlayFM | |
/// DoFAutofocus.cs | |
/// | |
/// HIGH Quality checks every Frame | |
/// NORMAL Quality in Fixed Update |
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 Underwater : MonoBehaviour { | |
//This script enables underwater effects. Attach to main camera. | |
//Define variable | |
public int underwaterLevel = 7; | |
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
var updateFreq = 1.0; | |
private var heading = 0.0; | |
private var gpsRef : Transform; | |
private var gpsRefN : int; | |
private var sender : Sender; | |
private var timer = 0.0; | |
function Start(){ | |
Init(); | |
} |
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
import System; | |
var date = DateTime.Now; | |
var timeDisplay : GUIText; | |
function Start() { | |
InvokeRepeating("Increment", 1.0, 1.0); | |
} | |
function Update () { | |
var seconds : float = date.TimeOfDay.Ticks / 10000000; | |
transform.rotation = Quaternion.LookRotation(Vector3.up); |
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
var arcAngle = 180.0; | |
var numLines = 181; | |
var maxDist = 8.0; | |
var scansPerSec = 3; | |
private var ranges : float[]; | |
private var timer = 0.0; | |
function LateUpdate(){ | |
DoScan2(); | |
} |
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 OnExplosionEffect : MonoBehaviour { | |
public float radius = 5; | |
public float power = 5; | |
public float upwardForce = 0; | |
private float radiusUsed = 0.5F; |
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 OnCollideExplode : MonoBehaviour | |
{ | |
// A grenade | |
// - instantiates a explosion prefab when hitting a surface | |
// - then destroys itself | |
public GameObject explosionPrefab; |
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
// Converted from UnityScript to C# at http://www.M2H.nl/files/js_to_c.php - by Mike Hergaarden | |
// Do test the code! You usually need to change a few small bits. | |
using UnityEngine; | |
using System.Collections; | |
public class lightController : MonoBehaviour { | |
public bool flicker = false; | |
public float onTime = 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
/* | |
* Playlist Object for the jPlayer Plugin | |
* http://www.jplayer.org | |
* | |
* Copyright (c) 2009 - 2013 Happyworm Ltd | |
* Dual licensed under the MIT and GPL licenses. | |
* - http://www.opensource.org/licenses/mit-license.php | |
* - http://www.gnu.org/copyleft/gpl.html | |
* | |
* Author: Mark J Panaghiston |
OlderNewer