jellewie / Unity-Gnorts

Gnorts an RTS unity game
11 stars 7 forks source link

Quick fix for custom destruct cursor. #35

Closed JorisVanEijden closed 5 years ago

JorisVanEijden commented 5 years ago

This works for the current special case of the destruct cursor. When there's a need for multiple different cursors a separate CursorManager class will be better https://www.youtube.com/watch?v=hV4fBMRRbRw

jellewie commented 5 years ago

I have rewritten and patch it using your code. It's now combined with the master, But I forgot to first merge it, so it's now in conflict and such (I'm still quite new to this concept) so sorry but this. Although the code is used, I can't mark it as a resolved branch

jellewie commented 5 years ago

the 'Destroy(InHand);' in '_DeconstructTool' (should be?) needed to stop building and start deconstructing.

(You removed the line in your code, was it by accident or was I wrong?)

JorisVanEijden commented 5 years ago

That's ok. Learning and progressing is the goal right? I moved the Destroy(InHand) to only be called when switching DeconstructToolEquiped on, not off. I'll close this PR since it's not needed anymore.

jellewie commented 5 years ago

@JorisVanEijden haven't though about it that way, you are right btw. Not sure how I did do it now but it won't hurt to check how it's at the master atm so (I) will try to check it soon.