Hi i have 3 buttons each of which set a different projectile for a player to shoot
i can have each buttons refer to the player and set the player.projectileToshoot relative to the button pressed...but that couples the UI buttons to the player
how can i avoid that...i thought of c# events that whenever i click on the button a event triggers but that too will need reference to player or buttons..
how should i go about doing this?
to clearify further I have a playershoot class which just shoots any projectile assigned to it....then i have a button class which is attached to each button...and here a projectile is chosen depending upon the button clicked...now i want that chosen projectile to be set to the playershoot projectile without coupling the UI to the player code
↧