Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
Open World
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOLM
Open World
Commits
08981f6f
Commit
08981f6f
authored
1 year ago
by
MaskedBook
Browse files
Options
Downloads
Patches
Plain Diff
misc changes
parent
a7c0b6bf
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Assets/Music.cs
+13
-2
13 additions, 2 deletions
Assets/Music.cs
Assets/Scenes/World 3.unity
+1163
-85
1163 additions, 85 deletions
Assets/Scenes/World 3.unity
with
1176 additions
and
87 deletions
Assets/Music.cs
+
13
−
2
View file @
08981f6f
...
...
@@ -4,15 +4,26 @@ using UnityEngine;
public
class
Music
:
MonoBehaviour
{
// Start is called before the first frame update
[
SerializeField
]
AudioClip
music
;
[
SerializeField
]
AudioClip
musictown
;
[
SerializeField
]
AudioSource
audio
;
void
Start
()
{
}
// Update is called once per frame
void
Update
()
{
}
private
void
OnTriggerEnter
(
Collider
other
)
{
audio
.
clip
=
musictown
;
audio
.
Play
();
}
private
void
OnTriggerExit
(
Collider
other
)
{
audio
.
clip
=
music
;
audio
.
Play
();
}
}
This diff is collapsed.
Click to expand it.
Assets/Scenes/World 3.unity
+
1163
−
85
View file @
08981f6f
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment