bunashibu / kikan

2D Multiplayer Online PvP Game (inspired from The Legends Return)
MIT License
3 stars 3 forks source link

i still learning about team battle , i read your code , and #2

Closed stickylabdev closed 5 years ago

stickylabdev commented 5 years ago

i still learning , its hard :D ,, i want to implement team battle to my game , can you help me learn about it if you dont mind

SiunCyclone commented 5 years ago

I think team battle is already implemented. If you couldn't play team battle on your unity editor, you might not set an AppId on your PhotonServerSettings. photon1 photon2 Or, if you are trying to play on Android, I don't know whether photon is compatible with mobile support.

stickylabdev commented 5 years ago

this is not what i mean -_- ,,I have made battle royale simple games, look at this https://play.google.com/store/apps/details?id=com.stickylab.FightAllAnimeChars&hl=en , but I am still in the process of making a team battle

SiunCyclone commented 5 years ago

In my game,

  1. Set team custom properties to the player before start battle(https://github.com/bunashibu/kikan/blob/master/Assets/Scripts/Matching/BattleLauncher.cs#L78-L79)
  2. When player is instantiated in battle scene, team is read from custom properties(https://github.com/bunashibu/kikan/blob/master/Assets/Scripts/Player/PlayerInfo.cs#L10)
  3. All skill decide whether player is one's teammate or enemy by TeamChecker(https://github.com/bunashibu/kikan/blob/master/Assets/Scripts/Skill/Magician/MagicianShift.cs#L20) (https://github.com/bunashibu/kikan/blob/master/Assets/Scripts/Skill/Utility/TeamChecker.cs)
stickylabdev commented 5 years ago

yeah thanks a lot bro ,,i appreciate your feedback

SiunCyclone commented 5 years ago

no problem