서원석

구현코드 업로드(중간보고서 내용까지)

Showing 1000 changed files with 167 additions and 65 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

No preview for this file type
No preview for this file type
......@@ -30,7 +30,7 @@ AnimatorState:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: flyAnimation
m_Speed: 8
m_Speed: 16
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
......
......@@ -8,7 +8,6 @@ public class RaycastController : MonoBehaviour
public float maxDistanceRay= 100f;
public static RaycastController instance;
public Text birdName;
public Transform gunFlashTarget;
public float fireRate = 1.6f;
private bool nextShot = true;
......@@ -16,21 +15,23 @@ public class RaycastController : MonoBehaviour
AudioSource audio;
public AudioClip[] clips;
void Awake() {
if (instance == null) {
instance = this;
}
}
public void playSound(int sound) {
audio.clip = clips[sound];
audio.Play();
}
// Start is called before the first frame update
void Start()
{
StartCoroutine(spawnNewBird());
audio = GetComponent<AudioSource>();
}
public void playSound(int sound) {
audio.clip = clips[sound];
audio.Play();
}
// Update is called once per frame
......@@ -47,20 +48,23 @@ public class RaycastController : MonoBehaviour
}
private IEnumerator takeShot() {
gunScript.instance.fireSound();
Ray ray = Camera.main.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0));
RaycastHit hit;
int layer_mask = LayerMask.GetMask("birdLayer");
if(Physics.Raycast(ray, out hit, maxDistanceRay, layer_mask)) {
//debug
//debug
objName = hit.collider.gameObject.name;
birdName.text = objName;
Vector3 birdPosition = hit.collider.gameObject.transform.position;
if(objName == "Bird_Asset(Clone)") {
GameObject Boom = Instantiate(Resources.Load("boom", typeof(GameObject))) as GameObject;
Boom.transform.position = birdPosition;
playSound(1);
Destroy(hit.collider.gameObject);
StartCoroutine(spawnNewBird());
StartCoroutine(clearBoom());
......@@ -72,6 +76,12 @@ public class RaycastController : MonoBehaviour
yield return new WaitForSeconds(fireRate);
nextShot = true;
GameObject[] gunSmokeGroup = GameObject.FindGameObjectsWithTag("GunSmoke");
foreach (GameObject theSmoke in gunSmokeGroup) {
Destroy(theSmoke.gameObject);
}
}
private IEnumerator clearBoom() {
yield return new WaitForSeconds(1.5f);
......@@ -93,9 +103,9 @@ public class RaycastController : MonoBehaviour
//Random Start Position
Vector3 temp;
temp.x = Random.Range(-4.8f/2, 4.8f/2);
temp.y = Random.Range(1f/2, 5f/2);
temp.z = Random.Range(-4.8f/2, 4.8f/2);
temp.x = Random.Range(-2f, 2f);
temp.y = Random.Range(1f, 3f);
temp.z = Random.Range(2f, 2f);
newBird.transform.position = new Vector3(temp.x,temp.y,temp.z);
}
}
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class gameController : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}
fileFormatVersion: 2
guid: 4c476f0c2b8ff4ba89a9f5603ce6cc4a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class gunScript : MonoBehaviour
{
AudioSource audio;
public static gunScript instance;
void Awake() {
if(instance == null) {
instance = this;
}
}
// Start is called before the first frame update
void Start()
{
audio = GetComponent<AudioSource>();
}
public void fireSound() {
audio.Play();
}
}
fileFormatVersion: 2
guid: 6dc1edebffd1f4db094497799c3153d8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -18,9 +18,10 @@ public class targetcollider : MonoBehaviour
public void moveTarget() {
Vector3 temp;
temp.x = Random.Range(-4.8f/2, 4.8f/2);
temp.y = Random.Range(1f/2, 3f/2);
temp.z = Random.Range(-4.8f/2, 4.8f/2);
temp.x = Random.Range(-2f, 2f);
temp.y = Random.Range(1f, 3f);
temp.z = Random.Range(-2f, 2f);
transform.position = new Vector3(temp.x,temp.y,temp.z);
RaycastController.instance.playSound(0);
}
}
......
......@@ -21,7 +21,7 @@ MonoBehaviour:
m_ShowMode: 4
m_Title:
m_RootView: {fileID: 6}
m_MinSize: {x: 875, y: 542}
m_MinSize: {x: 875, y: 300}
m_MaxSize: {x: 10000, y: 10000}
m_Maximized: 0
--- !u!114 &2
......@@ -48,7 +48,7 @@ MonoBehaviour:
m_MinSize: {x: 679, y: 492}
m_MaxSize: {x: 14002, y: 14042}
vertical: 0
controlID: 108
controlID: 58
--- !u!114 &3
MonoBehaviour:
m_ObjectHideFlags: 52
......@@ -64,9 +64,9 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 822
x: 823
y: 0
width: 415
width: 414
height: 705
m_MinSize: {x: 276, y: 71}
m_MaxSize: {x: 4001, y: 4021}
......@@ -92,7 +92,7 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 251
width: 252
height: 427
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
......@@ -118,7 +118,7 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 427
width: 822
width: 823
height: 278
m_MinSize: {x: 231, y: 271}
m_MaxSize: {x: 10001, y: 10021}
......@@ -214,12 +214,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 822
width: 823
height: 705
m_MinSize: {x: 403, y: 492}
m_MaxSize: {x: 10001, y: 14042}
vertical: 1
controlID: 109
controlID: 59
--- !u!114 &10
MonoBehaviour:
m_ObjectHideFlags: 52
......@@ -239,12 +239,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 822
width: 823
height: 427
m_MinSize: {x: 403, y: 221}
m_MaxSize: {x: 8003, y: 4021}
vertical: 0
controlID: 110
controlID: 60
--- !u!114 &11
MonoBehaviour:
m_ObjectHideFlags: 52
......@@ -260,7 +260,7 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 251
x: 252
y: 0
width: 571
height: 427
......@@ -290,15 +290,15 @@ MonoBehaviour:
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Animator
m_Image: {fileID: -6973158847631862895, guid: 0000000000000000d000000000000000,
m_Image: {fileID: 663490763026382308, guid: 0000000000000000d000000000000000,
type: 0}
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 280
y: 75
width: 722
height: 405
x: 260
y: 30
width: 589
height: 433
m_ViewDataDictionary: {fileID: 0}
m_ViewTransforms:
m_KeySerializationHelper:
......@@ -371,7 +371,7 @@ MonoBehaviour:
m_MaxSize: {x: 2048, y: 2048}
m_TitleContent:
m_Text: Asset Store
m_Image: {fileID: -4391848389275900105, guid: 0000000000000000d000000000000000,
m_Image: {fileID: 357073275683767465, guid: 0000000000000000d000000000000000,
type: 0}
m_Tooltip:
m_Pos:
......@@ -397,14 +397,14 @@ MonoBehaviour:
m_MaxSize: {x: 10000, y: 10000}
m_TitleContent:
m_Text: Project
m_Image: {fileID: -2032128904892744680, guid: 0000000000000000d000000000000000,
m_Image: {fileID: -7501376956915960154, guid: 0000000000000000d000000000000000,
type: 0}
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 43
y: 502
width: 821
width: 822
height: 257
m_ViewDataDictionary: {fileID: 0}
m_SearchFilter:
......@@ -420,20 +420,20 @@ MonoBehaviour:
m_SkipHidden: 0
m_SearchArea: 1
m_Folders:
- Assets/Resources
- Assets/Sounds
m_ViewMode: 1
m_StartGridSize: 64
m_LastFolders:
- Assets/Resources
- Assets/Sounds
m_LastFoldersGridSize: -1
m_LastProjectPath: /Users/sws/Duck Hunter AR
m_LockTracker:
m_IsLocked: 0
m_FolderTreeState:
scrollPos: {x: 0, y: 79}
m_SelectedIDs: a83a0000
m_LastClickedID: 15016
m_ExpandedIDs: 00000000883a000000ca9a3b
scrollPos: {x: 0, y: 78.36273}
m_SelectedIDs: 3a3b0000
m_LastClickedID: 15162
m_ExpandedIDs: 000000000c3b00000e3b0000103b000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
......@@ -461,7 +461,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 00000000883a0000
m_ExpandedIDs: 000000000c3b00000e3b0000103b0000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
......@@ -533,14 +533,14 @@ MonoBehaviour:
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Inspector
m_Image: {fileID: 8356117983803934776, guid: 0000000000000000d000000000000000,
m_Image: {fileID: -6905738622615590433, guid: 0000000000000000d000000000000000,
type: 0}
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 865
x: 866
y: 75
width: 414
width: 413
height: 684
m_ViewDataDictionary: {fileID: 0}
m_OpenAddComponentMenu: 0
......@@ -571,14 +571,14 @@ MonoBehaviour:
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Hierarchy
m_Image: {fileID: -9000905672528348964, guid: 0000000000000000d000000000000000,
m_Image: {fileID: -590624980919486359, guid: 0000000000000000d000000000000000,
type: 0}
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 43
y: 75
width: 250
width: 251
height: 406
m_ViewDataDictionary: {fileID: 0}
m_SceneHierarchy:
......@@ -586,21 +586,21 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 60fbffff
m_ExpandedIDs: 22f1ffff3ef1ffff26f4ffff34f4ffff68fbfffff2390000123a0000663a0000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
m_OriginalName:
m_Name: Landscape
m_OriginalName: Landscape
m_EditFieldRect:
serializedVersion: 2
x: 0
y: 0
width: 0
height: 0
m_UserData: 0
m_UserData: 14834
m_IsWaitingForDelay: 0
m_IsRenaming: 0
m_OriginalEventType: 11
m_OriginalEventType: 0
m_IsRenamingFilename: 0
m_ClientGUIView: {fileID: 4}
m_SearchString:
......@@ -626,12 +626,12 @@ MonoBehaviour:
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Scene
m_Image: {fileID: -131512000283675692, guid: 0000000000000000d000000000000000,
m_Image: {fileID: 2318424515335265636, guid: 0000000000000000d000000000000000,
type: 0}
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 294
x: 295
y: 75
width: 569
height: 406
......@@ -646,9 +646,9 @@ MonoBehaviour:
m_PlayAudio: 0
m_AudioPlay: 0
m_Position:
m_Target: {x: -0.3424908, y: 6.095478, z: -0.054552317}
m_Target: {x: 0.14776051, y: 0.14266396, z: -0.2225892}
speed: 2
m_Value: {x: -0.3424908, y: 6.095478, z: -0.054552317}
m_Value: {x: 0.14776051, y: 0.14266396, z: -0.2225892}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
......@@ -694,13 +694,13 @@ MonoBehaviour:
m_GridAxis: 1
m_gridOpacity: 0.5
m_Rotation:
m_Target: {x: -0.25960436, y: 0.5711201, z: -0.19677876, w: -0.7534632}
m_Target: {x: -0.494238, y: 0.5050252, z: -0.48078093, w: -0.5191611}
speed: 2
m_Value: {x: -0.25960422, y: 0.5711197, z: -0.19677864, w: -0.75346273}
m_Value: {x: -0.49423793, y: 0.50502515, z: -0.48078087, w: -0.51916105}
m_Size:
m_Target: 3.6011362
m_Target: 2.888471
speed: 2
m_Value: 3.6011362
m_Value: 2.888472
m_Ortho:
m_Target: 0
speed: 2
......@@ -718,7 +718,7 @@ MonoBehaviour:
m_FarClip: 10000
m_DynamicClip: 1
m_OcclusionCulling: 0
m_LastSceneViewRotation: {x: -0.25960436, y: 0.5711201, z: -0.19677876, w: -0.7534632}
m_LastSceneViewRotation: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226}
m_LastSceneViewOrtho: 0
m_ReplacementShader: {fileID: 0}
m_ReplacementString:
......@@ -741,12 +741,12 @@ MonoBehaviour:
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Game
m_Image: {fileID: 257045534191678443, guid: 0000000000000000d000000000000000,
m_Image: {fileID: -2087823869225018852, guid: 0000000000000000d000000000000000,
type: 0}
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 294
x: 295
y: 75
width: 569
height: 406
......@@ -786,7 +786,7 @@ MonoBehaviour:
m_HSlider: 0
m_VSlider: 0
m_IgnoreScrollWheelUntilClicked: 0
m_EnableMouseInput: 0
m_EnableMouseInput: 1
m_EnableSliderZoomHorizontal: 0
m_EnableSliderZoomVertical: 0
m_UniformScale: 1
......@@ -833,7 +833,7 @@ MonoBehaviour:
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Console
m_Image: {fileID: -3303252850963283158, guid: 0000000000000000d000000000000000,
m_Image: {fileID: 111653112392082826, guid: 0000000000000000d000000000000000,
type: 0}
m_Tooltip:
m_Pos:
......@@ -843,3 +843,28 @@ MonoBehaviour:
width: 850
height: 275
m_ViewDataDictionary: {fileID: 0}
--- !u!114 &20
MonoBehaviour:
m_ObjectHideFlags: 52
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: 12059, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier: UnityEditor:UnityEditor.Experimental.TerrainAPI:PaintTextureTool
m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Failed to load
m_Image: {fileID: 0}
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 0
y: 0
width: 320
height: 550
m_ViewDataDictionary: {fileID: 0}
......