Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

사운드 (플레이어 데미지 입는 경우 사운드, 배경 사운드) 추가 #5

Open
wants to merge 1 commit into
base: A_planet_ver1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions A_Planet/Assets/Attack Jump & Hit Damage Human Sounds.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions A_Planet/Assets/Player.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Player : MonoBehaviour
{
public AudioClip hitSound; // sound when player is damaged
private AudioSource hurtAudioPlayer; // audio source component

public void Awake()
{
// get using component from game object
hurtAudioPlayer = GetComponent<AudioSource>();
}

public void OnDamage(float damage, Vector3 hitPoint, Vector3 hitNormal)
{
if (!dead) // if player isn't dead
{
hurtAudioPlayer.PlayOneShot(hitSound);
}
}
}
11 changes: 11 additions & 0 deletions A_Planet/Assets/Player.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions A_Planet/Assets/Resources/OculusRuntimeSettings.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3863570e7e6387a40ae4f323d83291e5, type: 3}
m_Name: OculusRuntimeSettings
m_EditorClassIdentifier:
colorSpace: 7
8 changes: 8 additions & 0 deletions A_Planet/Assets/Resources/OculusRuntimeSettings.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

482 changes: 312 additions & 170 deletions A_Planet/Assets/Scenes/SampleScene.unity

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions A_Planet/Assets/Space Ambient Album - 101218.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading