So one thing that gave me trouble was that I always confused "You should only make what needs to be public public" with "You shouldn't have very many public things".
You may actually *Need* quite a few public properties/methods etc.
Imagine writing a library... the library is meant to perform a particular task (or set of tasks) configuring and telling the lib what to do may require a large amount of public properties/methods... but anything that is not required to configure or utilize the lib should not be public. Take C# windows.forms for example, the are hundreds of public properties/objects... but every single one of them performs some kind of data transfer from the assembly using the lib to the assembly implementing the lib... you have to know that there are even more objects/methods/members that the lib doesn't expose... if it had exposed all the things the end user doesn't need to know about it would be that much more difficult to utilize.
You also have an internal scope to work with as well. Internal scope is pretty much equivalent to public when working within the same assembly.
Just remember, scope and limiting scope is just a tool meant to help you organize your code, you won't see much (if any) performance difference between an object properly scoped and one that is entirely public, but you will find it easier to figure out how it's supposed to work/ how it is working.
The reason the rule is in place is because you want to make code as independent as possible.. Objects should only be concerned with their own particular responsibilities.
what if i have to read the mouse click while checking if i have a menu/tooltip/mouseover open (inside my menu class) and then checking if my mouse position correspond at a game location or a interface (inside my mouse class) and then checking if the mouse position in game correspond to an interacting object(so i have to check map class and object item) ?
The menu/tooltip shouldn't have to be responsible of keeping track of the mouse... it is only concerned with Displaying and allowing the user to interact with a menu... it shouldn't even care what happens when a particular option is selected. as long as it reports that an option has been selected it's done it's job.. something else can take care of what to do about it. A good way to acomplish this is to use events, Object O spawns a menu, it sends it a list of options to display and a list of delegates that corrospond to each option, the menu displays the options and if one is selected calls the appropriate delegate.
from my beginner point of view it seems equally bad design making a class "tree" and then implement in that class "enemySeesTree" "enemyAttackTree" "pahtingAvoidTree" "playerClickTree" "playerShotTree" and other 200 like this...
Remember, every distinct action/logic HAS to be defined Somewhere... you can only generalize to a point and somewhere along the line actual implementation has to occur. In this case I'd probably have events: onSighted(object sightedBy), onClick(), onCollision(object source) pathing would likely not be an event, but instead a method that return a pathing weight... getPathWeight(object pathingObject)