Jump to content

Is there a reason "showing" is private in NGUI scripts?


Jaroe

Recommended Posts

For my project, I have gotten rid of the mouse cursor on-screen unless one of the interface panels such as the inventory or character panels are opened. (Actually, I turned it into a reticle in my latest rebuild of the code.) But in order for this to work, I need to edit files such as "UGUICharacterPanel.cs" and modify "bool showing = false;" to be "public bool showing = false;" This allows me to call them from the "Atavism3rdPersonInput.cs" script to see what windows, if any, are opened and therefore stop the camera and player from moving. So far, what I've done works great and I only have to go back to the scripts if one of them are changed in an update. I just want to be sure I won't be setting myself up for other problems in the future. 

It might be helpful to note that I also allowed the mouse to rotate the player without pressing either of the buttons. 

Further note: I've created two public Boolean values in "Atavism3rdPersonInput.cs" that can be checked before or during runtime to revert back to the default mouse cursor and controls. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recommended Cloud Solution


    ksweb.net

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.