Beispiel #1
0
 void _onPrivateChallengeMessage(object sender, Events.ChallengeArgs args)
 {
     Events.PrivateChallengeArgs privateChallengeArgs = new Events.PrivateChallengeArgs(args.OtherPlayer.M3UserId(), args.OtherPlayer.M3NickName(), args.OtherPlayer.M3Trophies().ToString(), args.OtherPlayer.M3GuildName(), args.OtherPlayer.M3FacebookId(), args.BattleType);
     if ((args.BattleType & BattleType.FacebookMaskForCheck) > 0)
     {
         StateMachine.Instance.MakeTransition(typeof(StateReceivedChallengeFacebook), privateChallengeArgs);
     }
     else if ((args.BattleType & BattleType.GuildMaskForCheck) > 0)
     {
         StateMachine.Instance.MakeTransition(typeof(StateReceivedChallengeGuild), privateChallengeArgs);
     }
     else
     {
         //mode not supported
         ConnectionController.Instance.KickPlayer(args.OtherPlayer); //kick Player
     }
 }
Beispiel #2
0
 void _onPrivateChallengeStartBattleHandler(object sender, Events.ChallengeArgs args)
 {
     M3GameCache.SetBattleType(privateChallengeArgs.BattleType);
     StateMachine.Instance.MakeTransition(typeof(StateGoForOnlineBattle));
 }
Beispiel #3
0
 void _onPrivateChallengeNoHandler(object sender, Events.ChallengeArgs args)
 {
     DoShowDeclinedPopupAndGoBack();
 }
Beispiel #4
0
 void _onPrivateChallengeYesHandler(object sender, Events.ChallengeArgs args)
 {
     DoSendStartBattle();
 }
Beispiel #5
0
 void _onPrivateChallengeIgnoreHandler(object sender, Events.ChallengeArgs args)
 {
     DoTimeOutChallenge(0);
 }
Beispiel #6
0
 //EventManager Hookup
 void _onPrivateChallengeMessage(object sender, Events.ChallengeArgs args)
 {
     VersusScreen.Instance.SetLoadingTip(string.Format(LocalizationManager.Instance.GetString(LocalizationKeys.USER_CHALLENGE_WAITING_FOR_ACCEPT), privateChallengeArgs.OpponentNickName));
     DoTimeOutChallenge(ServerConfigurableValues.Instance.BattleChallengeRoomWait);
 }
Beispiel #7
0
 protected virtual void _onPrivateChallengeNoHandler(object sender, Events.ChallengeArgs args)
 {
     //We just sent a No to Opponent
 }
Beispiel #8
0
 protected virtual void _onPrivateChallengeBusyHandler(object sender, Events.ChallengeArgs args)
 {
     DoTimeOutChallenge(0);
 }