Quantcast
Channel: Latest Questions by haiderInUnity
Viewing all articles
Browse latest Browse all 26

button to select what player shoots

$
0
0
The Player shoots automatically..what it shoots depends upon which button is clicked button 1 clicked then projectile 1 is shot...button 2 clicked then projectile 2 is shot and so on I have buttons instantiated from a prefab depending upon what projectiles are available to shoot. i am confused about a decoupling solution to where the buttons when clicked should assign projectileToshoot in player class... so was thinking about events but then playerShoot class would need to subscribe to all the buttons to see which one is pressed to assign the projectileToshoot.. how should i go about this ? @Bunny83 ![alt text][1] [1]: /storage/temp/164181-capture.jpg

Viewing all articles
Browse latest Browse all 26

Trending Articles



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