diff --git a/Guardian of Silverkeep/Assets/Scenes/GameLevel1.unity b/Guardian of Silverkeep/Assets/Scenes/GameLevel1.unity index 95b14ef..c39f67c 100644 --- a/Guardian of Silverkeep/Assets/Scenes/GameLevel1.unity +++ b/Guardian of Silverkeep/Assets/Scenes/GameLevel1.unity @@ -21910,6 +21910,7 @@ GameObject: - 54: {fileID: 233711991} - 82: {fileID: 233711992} - 81: {fileID: 233711993} + - 131: {fileID: 233711994} m_Layer: 0 m_Name: Hero m_TagString: Player @@ -22052,6 +22053,7 @@ MonoBehaviour: type: 2} Hero_Attack_01_Prefab: {fileID: 100000, guid: 548fd220e2a904886aaeae294eed71a8, type: 2} + heroGetHurt: {fileID: 8300000, guid: e5cc52e974653fa48a92420c6036667d, type: 3} heroAttack: {fileID: 8300000, guid: 481b9c5915416514c84714836c1f5726, type: 3} heroGetJoystone: {fileID: 8300000, guid: ce8d709a7b3609f42ab2b569c8201818, type: 3} --- !u!54 &233711991 @@ -22135,6 +22137,25 @@ AudioListener: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 233711984} m_Enabled: 1 +--- !u!131 &233711994 +GUITexture: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 233711984} + m_Enabled: 1 + m_Texture: {fileID: 0} + m_Color: {r: .5, g: .5, b: .5, a: .5} + m_PixelInset: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_LeftBorder: 0 + m_RightBorder: 0 + m_TopBorder: 0 + m_BottomBorder: 0 --- !u!1 &233851097 GameObject: m_ObjectHideFlags: 0 @@ -123365,6 +123386,10 @@ Prefab: propertyPath: heroGetJoystone value: objectReference: {fileID: 8300000, guid: ce8d709a7b3609f42ab2b569c8201818, type: 3} + - target: {fileID: 11400000, guid: 62a6e0865cec44656be439b399ff7f72, type: 2} + propertyPath: heroGetHurt + value: + objectReference: {fileID: 8300000, guid: e5cc52e974653fa48a92420c6036667d, type: 3} m_RemovedComponents: - {fileID: 8100000, guid: 62a6e0865cec44656be439b399ff7f72, type: 2} m_ParentPrefab: {fileID: 100100000, guid: 62a6e0865cec44656be439b399ff7f72, type: 2} diff --git a/Guardian of Silverkeep/Assets/Scripts/EnemyAttack_Range.cs b/Guardian of Silverkeep/Assets/Scripts/EnemyAttack_Range.cs index 808f8ab..62d3800 100644 --- a/Guardian of Silverkeep/Assets/Scripts/EnemyAttack_Range.cs +++ b/Guardian of Silverkeep/Assets/Scripts/EnemyAttack_Range.cs @@ -14,7 +14,7 @@ public class EnemyAttack_Range : MonoBehaviour // initialization void Start () { //hero = (Hero) GameObject.Find("Hero").GetComponent("Hero"); - hero = GameObject.Find("Hero"); + hero = GameObject.FindWithTag("Player"); //destry itself after some time StartCoroutine(DestroySelf()); //when initializated, find self pos and hero pos to get projectile direction @@ -30,7 +30,7 @@ public class EnemyAttack_Range : MonoBehaviour void Update () { float amtToMove = ProjectileSpeed * Time.deltaTime; - transform.Translate((heroPosition - selfPosition) * amtToMove / tmpGetOne ); + transform.Translate((heroPosition - selfPosition) * amtToMove / tmpGetOne,Space.World ); } diff --git a/Guardian of Silverkeep/Assets/Scripts/FPS_HERO.cs b/Guardian of Silverkeep/Assets/Scripts/FPS_HERO.cs index e60bb13..e8774c1 100644 --- a/Guardian of Silverkeep/Assets/Scripts/FPS_HERO.cs +++ b/Guardian of Silverkeep/Assets/Scripts/FPS_HERO.cs @@ -25,6 +25,8 @@ public class FPS_HERO: MonoBehaviour private float timeStamp; private GameObject[] heroRef; MasterControl masterC; + //public GameObject stuffThatShouldSHowup; + public AudioClip heroGetHurt; public AudioClip heroAttack; public AudioClip heroGetJoystone; @@ -252,6 +254,7 @@ public class FPS_HERO: MonoBehaviour { if(state == State.Playing) { + audio.PlayOneShot(heroGetHurt); this.Health -= dmg; if(this.Health > 0) StartCoroutine(gotHitCoroutine()); diff --git a/Guardian of Silverkeep/Assets/Texture/Materials/Thumbs.db.meta b/Guardian of Silverkeep/Assets/Texture/Materials/Thumbs.db.meta deleted file mode 100644 index abe9cf3..0000000 --- a/Guardian of Silverkeep/Assets/Texture/Materials/Thumbs.db.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 972efccb1bfc24c8b9e2ed1c6fbb5453 -DefaultImporter: - userData: