Commit 7fd5302d authored by 杨泽宇's avatar 杨泽宇

更新

parent e02993a8
......@@ -12,5 +12,5 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 690929a59dc7a42da9030305190d391f, type: 3}
m_Name: XRDeviceSimulatorSettings
m_EditorClassIdentifier:
m_AutomaticallyInstantiateSimulatorPrefab: 1
m_SimulatorPrefab: {fileID: 6598815579406187037, guid: 18ddb545287c546e19cc77dc9fbb2189, type: 3}
m_AutomaticallyInstantiateSimulatorPrefab: 0
m_SimulatorPrefab: {fileID: 0}
......@@ -50,14 +50,14 @@ MonoBehaviour:
animationStateStartValue: {r: 0, g: 0, b: 0, a: 0}
animationStateEndValue: {r: 0, g: 0, b: 0, a: 0}
- stateName: hovered
animationStateStartValue: {r: 0.6784314, g: 0.6784314, b: 0.6784314, a: 0.56078434}
animationStateStartValue: {r: 1, g: 0, b: 0, a: 0.56078434}
animationStateEndValue: {r: 0.6784314, g: 0.6784314, b: 0.6784314, a: 0.5529412}
- stateName: hoveredPriority
animationStateStartValue: {r: 1, g: 1, b: 1, a: 0.74509805}
animationStateEndValue: {r: 1, g: 1, b: 1, a: 0.77254903}
- stateName: selected
animationStateStartValue: {r: 1, g: 1, b: 1, a: 1}
animationStateEndValue: {r: 1, g: 0.40000004, b: 0, a: 1}
animationStateStartValue: {r: 1, g: 1, b: 1, a: 0}
animationStateEndValue: {r: 0.990566, g: 0.990566, b: 0.990566, a: 0}
- stateName: activated
animationStateStartValue: {r: 1, g: 0.40000004, b: 0, a: 1}
animationStateEndValue: {r: 1, g: 0, b: 0, a: 1}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
/// <summary>
/// 弓控制器
......@@ -14,6 +15,8 @@ public class BowController : MonoBehaviour
public GameObject stringEndPoint;
public GameObject stringMiddlePoint;
public UnityEvent ArrowOnEvent;
// Start is called before the first frame update
void Start()
{
......@@ -32,6 +35,8 @@ public class BowController : MonoBehaviour
stringMiddlePoint.transform.position = (stringStartPoint.transform.position + stringEndPoint.transform.position + new Vector3(0, 0.07f, 0)) / 2;
stringMiddlePoint.GetComponent<Rigidbody>().velocity = new Vector3(0, 0, 0);
stringMiddlePoint.GetComponent<Rigidbody>().angularVelocity = new Vector3(0, 0, 0);
//可以发射弓箭
if (arrowTrigger.GetComponent<ArrowTrigger>().arrowOnBow)
{
GameObject arrowOnBow = arrowTrigger.GetComponent<ArrowTrigger>().arrowOnBow;
......@@ -41,6 +46,7 @@ public class BowController : MonoBehaviour
arrowOnBow.GetComponent<ArrowController>().waitingToShoot = false;
arrowOnBow.GetComponent<Rigidbody>().AddForce(arrowOnBow.GetComponent<ArrowController>().arrowHeading *
arrowOnBow.GetComponent<ArrowController>().arrowHeading.magnitude * arrowSpeed);
ArrowOnEvent.Invoke();
}
}
}
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;
/// <summary>
/// 绘制拉伸的弓弦
/// </summary>
public class PullMeasurer : XRBaseInteractable
{
[SerializeField] private Transform start; // 拉伸测量的起始点
......
fileFormatVersion: 2
guid: 22243a112d4de754abac2220fbfb1543
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 99fff99e3c12d944c9818590aed6ced4
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 2f4afd90f677fef4e8ad7e901f7b3b74
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: b9cb2e2aed89f4d4082c971e8971802e
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment