Open erwinhenraat opened 9 years ago
if (other.gameObject.GetComponent<Creature>() != null && other.gameObject.tag != "Player"){ other.gameObject.GetComponent<Creature>().GetDamage(_damage); Destroy(this.gameObject); }
Bestand: https://github.com/Darkfafi/Mythe_Orion_Game/blob/master/Assets/_Scripts/Items/Weapons/Projectiles/Projectile.cs
Wellicht wil je ook nog enemies maken die projectielen kunnen schieten.
Deze zal nu niet op de speler werken. Maak de waarde waarmee je de tag checkt variabel.
hmm ja dan moet ik checken of degene die schiet niet degene is die geraakt word. Dank u wel!
Bestand: https://github.com/Darkfafi/Mythe_Orion_Game/blob/master/Assets/_Scripts/Items/Weapons/Projectiles/Projectile.cs
Wellicht wil je ook nog enemies maken die projectielen kunnen schieten.
Deze zal nu niet op de speler werken. Maak de waarde waarmee je de tag checkt variabel.