cacheProperties accessiblity

edited July 2014 in Android Java (deprecated)

I'm a confirm developper in C# but a newbit in Java

I'm coding my first app for android with Photon

There's something I don't undestant in the loadbalancing API.

In the class LoadBalancingClient you have
protected Player createPlayer(String actorName, int actorNumber, boolean isLocal, HashMap<Object, Object> actorProperties)
        Player newPlayer = new Player(actorName, actorNumber, isLocal);
        return newPlayer;

but the methode cacheProperties is protected in the class Player. For me when a methode is protected only the class who extend the base class can access to the methode. LoadBalancingClient is not extends Player.

Thats not blocking but i'm curious to undestant how it's work

Best regards



  • Tobias
    Curiosity is always good :)

    I don't use Java a lot anymore but as far as I can see, the protected keyword is a bit different in Java than in C#. It can be used from sub-classes but also by inside the same package: ... /protected

    If you challenge yourself to learn Java Android programming, that's cool. If you know C# and just want to get a game done, you might consider Unity as platform. Our most successful client package is Photon Unity Networking (called PUN) for that. You find it in the Asset Store and it's even easier to work with than the Android package.
  • vmarquis
    Thank for your Quick response

    I have consider Unity but I thinks it's not apdapted for my game who is a poker game .
    I plan to use GUI and not sprite or 3D fonctionnality and using Unity for that seems to me complicate.

    Maybe I'm wrong, let me know if I am.

    Best regards

  • Tobias
    Usually, Unity is quite good for any type of game. The built-in UI is dated and cumbersome to use, true.
    But there are alternatives and Unity 4.6 should include a new UI system which is very capable.
    It's an all-round good engine, no matter if 3d or 2d, gui or whatever.
    The only weak point might be that the engine has some MB footprint on the app-size. That's often not a big deal.

    As said: If you feel at home with Java, don't break a sweat about Unity. It's just an option :)