Files
old-profesor-atom/Profesor Atom/Library/metadata/d4/d4e8a839a7c5b7e4580c59e305fb5f01

147 lines
8.5 KiB
Plaintext
Raw Normal View History

2017-05-17 12:25:25 +03:00
a"15.6.1f1<00><><EFBFBD><EFBFBD><00><><EFBFBD>0<05><><EFBFBD><EFBFBD>L.`?^<5E>0D7<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><><00><00><00><00><00><00><00><00><00>#<00><00>+H<00>3<00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00> Q<00>j<00>
<00><00>< <00><00>H H<00>Z<00><><EFBFBD><EFBFBD> <00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00><00><00>g<00><00><00><00><00><00>#<00><00>+v~<00><00><><00><00><><00><00><><00><00><><00><00><><00><00><><00><00><><00><00><><00><00><><00><00><> <00><00><>!<00><00><>"<00><00><>#<00><00>$<00><00>%<00><00>&<00><00>#<00><><EFBFBD><EFBFBD>'<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>(<00><00><00><00>)H<00>j<00><><EFBFBD><EFBFBD><EFBFBD>*<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>+@<00><00><00>,Q<00>j<00>-<00><00>*.<00><00>8/AssetMetaDataguiddata[0]data[1]data[2]data[3]pathNametimeCreatedoriginalChangesetoriginalNameoriginalParentHash128originalDigestbytes[0]bytes[1]bytes[2]bytes[3]bytes[4]bytes[5]bytes[6]bytes[7]bytes[8]bytes[9]bytes[10]bytes[11]bytes[12]bytes[13]bytes[14]bytes[15]labelsassetStoreReflicenseType <00><>z{<0E>@<40><05><>5^(<28>H'<00>7<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><><00> <00><00> <00><00>#.<00>,<00><00><><00> <00><00>#.<00>,H<00><><00><><EFBFBD><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD> @<00><00><00>
Q<00>j<00> <00><00>5<00><><EFBFBD><EFBFBD> <00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD> <00><00><00><00><00>j<00><><EFBFBD><EFBFBD><EFBFBD><00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>y<00>
<00> <00><00>#.<00>, <00>I@<00><00>X @<00><00>#.<00>,H<00>]<00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>H<00>h<00><><EFBFBD><EFBFBD><00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD> @<00><00><00>!Q<00>j<00>"H<00>z<00><><EFBFBD><EFBFBD>#<00>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>$@<00><00><00>%Q<00>j<00>&MonoImporterPPtr<EditorExtension>m_FileIDm_PathIDm_DefaultReferencesexecutionOrdericonm_UserDatam_AssetBundleNamem_AssetBundleVariants<00><><EFBFBD>8-l'<27><>愁h<E68481>ΐA,<00><00>7<00><><EFBFBD><EFBFBD><EFBFBD><00><00><00><><00><00><00> <00><00>.<00><00><00><><00> <00><00>.<00>H<00><><00><><EFBFBD><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD> @<00><00><00>
Q<00>j<00> H<00><><00><><EFBFBD><EFBFBD><EFBFBD> <01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD> @<00><00><00>Q<00>j<00><00><00>(<00><><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD><01><00><00><00><00>j<00><><EFBFBD><EFBFBD><EFBFBD><01>H<00><><00><><EFBFBD><EFBFBD><EFBFBD><01>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>@<00><00><00>Q<00>j<00>y<00>
<00> <00><00>.<00>y<00>< <00><00>.<00><00><00>CH<00>T<00><><EFBFBD><EFBFBD><10>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD> @<00><00><00>!Q<00>j<00>"H<00>`<00><><EFBFBD><EFBFBD>#<10>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>$@<00><00><00>%Q<00>j<00>&H<00>l<00><><EFBFBD><EFBFBD>'<10>1<00>1<00><><EFBFBD><EFBFBD><EFBFBD>(@<00><00><00>)Q<00>j<00>*L<00>{+PPtr<EditorExtension>m_FileIDm_PathIDm_DefaultReferencesm_Iconm_ExecutionOrderm_ClassNamem_Namespacem_AssemblyNamem_IsEditorScript<00><00>@<00>y<EFBFBD><00>iM<><4D><EFBFBD>z\{N<><4E><EFBFBD>>P<><50>-Assets/SteamVR/Extras/SteamVR_LaserPointer.cs<00>8AUSteamVR_LaserPointer<65>//======= Copyright (c) Valve Corporation, All rights reserved. ===============
using UnityEngine;
using System.Collections;
public struct PointerEventArgs
{
public uint controllerIndex;
public uint flags;
public float distance;
public Transform target;
}
public delegate void PointerEventHandler(object sender, PointerEventArgs e);
public class SteamVR_LaserPointer : MonoBehaviour
{
public bool active = true;
public Color color;
public float thickness = 0.002f;
public GameObject holder;
public GameObject pointer;
bool isActive = false;
public bool addRigidBody = false;
public Transform reference;
public event PointerEventHandler PointerIn;
public event PointerEventHandler PointerOut;
Transform previousContact = null;
// Use this for initialization
void Start ()
{
holder = new GameObject();
holder.transform.parent = this.transform;
holder.transform.localPosition = Vector3.zero;
holder.transform.localRotation = Quaternion.identity;
pointer = GameObject.CreatePrimitive(PrimitiveType.Cube);
pointer.transform.parent = holder.transform;
pointer.transform.localScale = new Vector3(thickness, thickness, 100f);
pointer.transform.localPosition = new Vector3(0f, 0f, 50f);
pointer.transform.localRotation = Quaternion.identity;
BoxCollider collider = pointer.GetComponent<BoxCollider>();
if (addRigidBody)
{
if (collider)
{
collider.isTrigger = true;
}
Rigidbody rigidBody = pointer.AddComponent<Rigidbody>();
rigidBody.isKinematic = true;
}
else
{
if(collider)
{
Object.Destroy(collider);
}
}
Material newMaterial = new Material(Shader.Find("Unlit/Color"));
newMaterial.SetColor("_Color", color);
pointer.GetComponent<MeshRenderer>().material = newMaterial;
}
public virtual void OnPointerIn(PointerEventArgs e)
{
if (PointerIn != null)
PointerIn(this, e);
}
public virtual void OnPointerOut(PointerEventArgs e)
{
if (PointerOut != null)
PointerOut(this, e);
}
// Update is called once per frame
void Update ()
{
if (!isActive)
{
isActive = true;
this.transform.GetChild(0).gameObject.SetActive(true);
}
float dist = 100f;
SteamVR_TrackedController controller = GetComponent<SteamVR_TrackedController>();
Ray raycast = new Ray(transform.position, transform.forward);
RaycastHit hit;
bool bHit = Physics.Raycast(raycast, out hit);
if(previousContact && previousContact != hit.transform)
{
PointerEventArgs args = new PointerEventArgs();
if (controller != null)
{
args.controllerIndex = controller.controllerIndex;
}
args.distance = 0f;
args.flags = 0;
args.target = previousContact;
OnPointerOut(args);
previousContact = null;
}
if(bHit && previousContact != hit.transform)
{
PointerEventArgs argsIn = new PointerEventArgs();
if (controller != null)
{
argsIn.controllerIndex = controller.controllerIndex;
}
argsIn.distance = hit.distance;
argsIn.flags = 0;
argsIn.target = hit.transform;
OnPointerIn(argsIn);
previousContact = hit.transform;
}
if(!bHit)
{
previousContact = null;
}
if (bHit && hit.distance < 100f)
{
dist = hit.distance;
}
if (controller != null && controller.triggerPressed)
{
pointer.transform.localScale = new Vector3(thickness * 5f, thickness * 5f, dist);
}
else
{
pointer.transform.localScale = new Vector3(thickness, thickness, dist);
}
pointer.transform.localPosition = new Vector3(0f, 0f, dist/2f);
}
}
SteamVR_LaserPointerAssembly-CSharp.dll