Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Call a Damage() function in a Player script from a projectile prefab

$
0
0
So, over the past 48 hours, I started to realize that I've been doing things very, very wrong.

Therefore, I decided to basically start over and create base classes that my player and enemies can inherit from, and possibly override functions, based on the needs of specific enemies or player.

OK, so I have this projectile prefab, and my player's "health manager" class inherits from the base "health" class, which has things such as a Damage() function that reduces health by a certain...

Call a Damage() function in a Player script from a projectile prefab

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>