diff options
Diffstat (limited to 'Assets/ProFlares/DemoScripts')
-rw-r--r-- | Assets/ProFlares/DemoScripts/CopyRotationValue.cs | 26 | ||||
-rw-r--r-- | Assets/ProFlares/DemoScripts/CopyRotationValue.cs.meta | 11 | ||||
-rw-r--r-- | Assets/ProFlares/DemoScripts/RotateTransform.cs | 21 | ||||
-rw-r--r-- | Assets/ProFlares/DemoScripts/RotateTransform.cs.meta | 11 | ||||
-rw-r--r-- | Assets/ProFlares/DemoScripts/SpinInput.cs | 129 | ||||
-rw-r--r-- | Assets/ProFlares/DemoScripts/SpinInput.cs.meta | 11 | ||||
-rw-r--r-- | Assets/ProFlares/DemoScripts/Zoom.cs | 47 | ||||
-rw-r--r-- | Assets/ProFlares/DemoScripts/Zoom.cs.meta | 11 |
8 files changed, 0 insertions, 267 deletions
diff --git a/Assets/ProFlares/DemoScripts/CopyRotationValue.cs b/Assets/ProFlares/DemoScripts/CopyRotationValue.cs deleted file mode 100644 index f42b896..0000000 --- a/Assets/ProFlares/DemoScripts/CopyRotationValue.cs +++ /dev/null @@ -1,26 +0,0 @@ -//// ProFlares - v1.08 - Copyright 2014-2015 All rights reserved - ProFlares.com - - -/// CopyRotationValue.cs -/// Copy the targets transforms rotational value. - -using UnityEngine; -using System.Collections; - -namespace ProFlares { - public class CopyRotationValue : MonoBehaviour { - public Transform target; - - Transform thisTrans; - void Start () { - thisTrans = transform; - if(target == null) - this.enabled = false; - } - - void LateUpdate () { - - thisTrans.localRotation = target.rotation; - } - } -} diff --git a/Assets/ProFlares/DemoScripts/CopyRotationValue.cs.meta b/Assets/ProFlares/DemoScripts/CopyRotationValue.cs.meta deleted file mode 100644 index d2cc490..0000000 --- a/Assets/ProFlares/DemoScripts/CopyRotationValue.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: caeefc16a0ffc48dd8f63c1c92e16f99 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/ProFlares/DemoScripts/RotateTransform.cs b/Assets/ProFlares/DemoScripts/RotateTransform.cs deleted file mode 100644 index 2f54743..0000000 --- a/Assets/ProFlares/DemoScripts/RotateTransform.cs +++ /dev/null @@ -1,21 +0,0 @@ -/// ProFlares - v1.08 - Copyright 2014-2015 All rights reserved - ProFlares.com - -using UnityEngine; -using System.Collections; - -public class RotateTransform : MonoBehaviour { - - Transform thisTransform; - - public Vector3 Speed = new Vector3(0,20f,0); - - void Start () { - thisTransform = transform; - } - - void Update () { - Quaternion offset = Quaternion.Euler(Speed * Time.deltaTime); - thisTransform.localRotation = thisTransform.localRotation*offset; - } - -} diff --git a/Assets/ProFlares/DemoScripts/RotateTransform.cs.meta b/Assets/ProFlares/DemoScripts/RotateTransform.cs.meta deleted file mode 100644 index c16fdb5..0000000 --- a/Assets/ProFlares/DemoScripts/RotateTransform.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1d89303dd8d2742a8aef9c0ad9d88e57 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/ProFlares/DemoScripts/SpinInput.cs b/Assets/ProFlares/DemoScripts/SpinInput.cs deleted file mode 100644 index 195917f..0000000 --- a/Assets/ProFlares/DemoScripts/SpinInput.cs +++ /dev/null @@ -1,129 +0,0 @@ -/// ProFlares - v1.08 - Copyright 2014-2015 All rights reserved - ProFlares.com - - -/// <summary> -/// SpinInput.cs -/// Rotates a transform based on click dragging. Works on ether X or Y Axis. Y Axis can be limited. -/// </summary> - -using UnityEngine; -using System.Collections; - -namespace ProFlares { -public class SpinInput : MonoBehaviour { - - private Transform thisTransform; - - float xVerlo; - - float targetVerloX; - float lastX; - float currentX; - - float offsetX; - - float finalVeloX; - - float tempVeloX; - - float YVerlo; - - float targetVerloY; - float lastY; - float currentY; - - float offsetY; - - float finalVeloY; - - float tempVeloY; - - public int cropDist = 180; - - public float ResponseTime = 0.2f; - - public bool touchMode = true; - void Start () { - thisTransform = transform; - } - - public bool X; - - public bool Y; - - - void LateUpdate () { - - - if(X){ - - if(Input.GetMouseButtonDown(0)){ - // print("MouseDown"); - lastX = 0; - currentX = 0; - offsetX = Input.mousePosition.x; - } - - - if(Input.GetMouseButton(0)){ - - lastX = currentX; - currentX = Input.mousePosition.x-offsetX; - - targetVerloX = (currentX-lastX)*2; - - if((currentX-lastX > 1)||(currentX-lastX < -1)){ - - } - targetVerloX = targetVerloX*3.5f; - - }else{ - - targetVerloX = targetVerloX*0.95f; - } - finalVeloX = Mathf.Lerp(finalVeloX,targetVerloX,20*Time.deltaTime); - - thisTransform.Rotate(0,finalVeloX*Time.deltaTime,0); - } - - - - if(Y){ - if(Input.GetMouseButtonDown(0)){ - // print("MouseDown"); - lastY = 0; - currentY = 0; - offsetY = Input.mousePosition.y; - } - - if(Input.GetMouseButton(0)){ - - lastY = currentY; - currentY = Input.mousePosition.y-offsetY; - - targetVerloY = (currentY-lastY)*-2; - targetVerloY = targetVerloY*1.5f; - - }else{ - - targetVerloY = targetVerloY*0.95f; - } - - - finalVeloY = Mathf.Lerp(finalVeloY,targetVerloY,20*Time.deltaTime); - - - thisTransform.Rotate(finalVeloY*Time.deltaTime,0,0); - - - Quaternion newrotation = thisTransform.rotation; - - newrotation.x = Mathf.Clamp(newrotation.x,-0.1f,0.3f); - - thisTransform.rotation = newrotation; - - } - - } - } -}
\ No newline at end of file diff --git a/Assets/ProFlares/DemoScripts/SpinInput.cs.meta b/Assets/ProFlares/DemoScripts/SpinInput.cs.meta deleted file mode 100644 index 682d0ba..0000000 --- a/Assets/ProFlares/DemoScripts/SpinInput.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1a921a8497aac47309e350980e0a7cf1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/ProFlares/DemoScripts/Zoom.cs b/Assets/ProFlares/DemoScripts/Zoom.cs deleted file mode 100644 index 5caece9..0000000 --- a/Assets/ProFlares/DemoScripts/Zoom.cs +++ /dev/null @@ -1,47 +0,0 @@ -/// ProFlares - v1.08 - Copyright 2014-2015 All rights reserved - ProFlares.com - -/// <summary> -/// Zoom.cs -/// Attach to a transform, which will then move in on the Z Axis when the mouse wheel is used. -/// </summary> -using UnityEngine; -using System.Collections; - -namespace ProFlares{ - public class Zoom : MonoBehaviour { - - Transform thisTrans; - - public float current; - - public float prev; - - void Start () { - thisTrans = transform; - } - - public float pos = 0; - - public float dif; - - public float offset; - - void Update () { - prev = current; - current = Input.GetAxis("Mouse ScrollWheel"); - - if(Input.GetKey(KeyCode.UpArrow)) - current = 0.1f; - - if(Input.GetKey(KeyCode.DownArrow)) - current = -0.1f; - - dif = (prev-current)*-0.3f; - pos = Mathf.Clamp(pos + dif,-1f,1f); - - Vector3 newPos = thisTrans.localPosition; - newPos.z = Mathf.Clamp(thisTrans.localPosition.z+current,-2f,3f); - thisTrans.localPosition = newPos; - } - } -} diff --git a/Assets/ProFlares/DemoScripts/Zoom.cs.meta b/Assets/ProFlares/DemoScripts/Zoom.cs.meta deleted file mode 100644 index 3894500..0000000 --- a/Assets/ProFlares/DemoScripts/Zoom.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7273bde5c1c224e26b0efa033fe287fd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: |