Universal selection

Project: Armament
Role: Game Programmer
Completed: 159.58 Sgt Lead Robert Peric Game Programmer
Start Date: 5/16/2018 14:05
End Date: 5/25/2018 09:05
Objective
We need one script to select units or buildings.  Currently, we have two that function independently.  We want one.  This script should highlight the unit that is selected.  Using the 2x2 pixel sprite a rectangle should apear when the mouse button is dragged.  This rectangle should have the same angle as the camera regardless of the direction its is pointing.  The right mouse button will select the unit and the left mouse button will deselect.  We need both buildings and units selectable
Universal selection

Assets
No Public Asset Available

Complete Task
1.50 HR.
Played with scripts and reading online to try to find best way to put everything into single script capable of dealing with selecting demands. For now i think il go with script attached to empty game object rather then one attached to every unit and building.

1.00 HR.
Finished with one click unit/building selection, now starting to set multiple units selection.

1.00 HR.
Finished with multiple units selection part, now i need to consult game designer about bug with selection rectangle.


Liaison

Hey @robert how are things coming along with this agenda?


Hey, thing is that i have exam tomorrow so I had to study, I’ll have this finished in two day.


Okay no rush i just wanted to check in see how you were doing thats all.  Good luck on that exam!


Thank you. I know you’re not rushing me, no worries;)


@Jono i made little change in selectionRectangle regarding its angle. If you find it aggain not working as it should please provide me some more details when/how that bug occurs.


@robert it works great im happy with it.