Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
顺
顺职VR迷宫游戏教学
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨泽宇
顺职VR迷宫游戏教学
Commits
7fd5302d
Commit
7fd5302d
authored
Mar 04, 2024
by
杨泽宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
e02993a8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
4652 additions
and
577 deletions
+4652
-577
XRDeviceSimulatorSettings.asset
...ts/XRI/Settings/Resources/XRDeviceSimulatorSettings.asset
+2
-2
ColorAffordanceTheme.asset
Assets/XRI_Examples/Global/Themes/ColorAffordanceTheme.asset
+3
-3
2_Maze2.unity
Assets/_Scenes/2_Maze2.unity
+4572
-565
BowController.cs
Assets/_Scripts/BowController.cs
+6
-0
PullMeasurer.cs
Assets/_Scripts/PullMeasurer.cs
+3
-0
保留空文件夹用,需删除.txt
Assets/_美术资源/11_声音/保留空文件夹用,需删除.txt
+0
-0
保留空文件夹用,需删除.txt.meta
Assets/_美术资源/11_声音/保留空文件夹用,需删除.txt.meta
+0
-7
开锁.mp3
Assets/_美术资源/11_声音/开锁.mp3
+0
-0
开锁.mp3.meta
Assets/_美术资源/11_声音/开锁.mp3.meta
+22
-0
弓箭发射.mp3
Assets/_美术资源/11_声音/弓箭发射.mp3
+0
-0
弓箭发射.mp3.meta
Assets/_美术资源/11_声音/弓箭发射.mp3.meta
+22
-0
弓箭射中靶子.mp3
Assets/_美术资源/11_声音/弓箭射中靶子.mp3
+0
-0
弓箭射中靶子.mp3.meta
Assets/_美术资源/11_声音/弓箭射中靶子.mp3.meta
+22
-0
No files found.
Assets/XRI/Settings/Resources/XRDeviceSimulatorSettings.asset
View file @
7fd5302d
...
...
@@ -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
}
Assets/XRI_Examples/Global/Themes/ColorAffordanceTheme.asset
View file @
7fd5302d
...
...
@@ -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
}
...
...
Assets/_Scenes/2_Maze2.unity
View file @
7fd5302d
This diff is collapsed.
Click to expand it.
Assets/_Scripts/BowController.cs
View file @
7fd5302d
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
();
}
}
}
Assets/_Scripts/PullMeasurer.cs
View file @
7fd5302d
using
UnityEngine
;
using
UnityEngine.XR.Interaction.Toolkit
;
/// <summary>
/// 绘制拉伸的弓弦
/// </summary>
public
class
PullMeasurer
:
XRBaseInteractable
{
[
SerializeField
]
private
Transform
start
;
// 拉伸测量的起始点
...
...
Assets/_美术资源/11_声音/保留空文件夹用,需删除.txt
deleted
100644 → 0
View file @
e02993a8
Assets/_美术资源/11_声音/保留空文件夹用,需删除.txt.meta
deleted
100644 → 0
View file @
e02993a8
fileFormatVersion: 2
guid: 22243a112d4de754abac2220fbfb1543
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/_美术资源/11_声音/开锁.mp3
0 → 100644
View file @
7fd5302d
File added
Assets/_美术资源/11_声音/开锁.mp3.meta
0 → 100644
View file @
7fd5302d
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:
Assets/_美术资源/11_声音/弓箭发射.mp3
0 → 100644
View file @
7fd5302d
File added
Assets/_美术资源/11_声音/弓箭发射.mp3.meta
0 → 100644
View file @
7fd5302d
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:
Assets/_美术资源/11_声音/弓箭射中靶子.mp3
0 → 100644
View file @
7fd5302d
File added
Assets/_美术资源/11_声音/弓箭射中靶子.mp3.meta
0 → 100644
View file @
7fd5302d
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:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment