Exemplo n.º 1
0
 public ClientMovementResults(
     ActorData triggeringMover,
     BoardSquarePathInfo triggeringPath,
     List <ServerClientUtils.SequenceStartData> seqStartDataList,
     ClientEffectResults effectResults,
     ClientBarrierResults barrierResults,
     ClientAbilityResults powerupResults,
     ClientAbilityResults gameModeResults)
 {
     m_triggeringMover  = triggeringMover;
     m_triggeringPath   = triggeringPath;
     m_seqStartDataList = seqStartDataList;
     m_effectResults    = effectResults;
     m_barrierResults   = barrierResults;
     m_powerupResults   = powerupResults;
     m_gameModeResults  = gameModeResults;
     if (m_effectResults != null)
     {
         m_effectResults.MarkActorHitsAsMovementHits();
     }
     if (m_barrierResults != null)
     {
         m_barrierResults.MarkActorHitsAsMovementHits();
     }
     if (m_powerupResults != null)
     {
         m_powerupResults.MarkActorHitsAsMovementHits();
     }
     if (m_gameModeResults != null)
     {
         m_gameModeResults.MarkActorHitsAsMovementHits();
     }
     m_alreadyReacted = false;
 }
Exemplo n.º 2
0
 public ClientPowerupResults(
     List <ServerClientUtils.SequenceStartData> seqStartDataList,
     ClientAbilityResults clientAbilityResults)
 {
     m_seqStartDataList      = seqStartDataList;
     m_powerupAbilityResults = clientAbilityResults;
 }
Exemplo n.º 3
0
        public static ClientMovementResults DeSerializeClientMovementResultsFromStream(Component context,
                                                                                       ref IBitStream stream)
        {
            sbyte invalidActorIndex = (sbyte)ActorData.s_invalidActorIndex;

            stream.Serialize(ref invalidActorIndex);
            var   triggeringPath   = MovementUtils.DeSerializeLightweightPath(context, stream);
            var   seqStartDataList = DeSerializeSequenceStartDataListFromStream(ref stream);
            sbyte num = 0;

            stream.Serialize(ref num);
            var gameplayResponseType             = (MovementResults_GameplayResponseType)num;
            ClientEffectResults  effectResults   = null;
            ClientBarrierResults barrierResults  = null;
            ClientAbilityResults powerupResults  = null;
            ClientAbilityResults gameModeResults = null;

            switch (gameplayResponseType)
            {
            case MovementResults_GameplayResponseType.Effect:
                effectResults = DeSerializeClientEffectResultsFromStream(context, ref stream);
                break;

            case MovementResults_GameplayResponseType.Barrier:
                barrierResults = DeSerializeClientBarrierResultsFromStream(context, ref stream);
                break;

            case MovementResults_GameplayResponseType.Powerup:
                powerupResults = DeSerializeClientAbilityResultsFromStream(context, ref stream);
                break;

            case MovementResults_GameplayResponseType.GameMode:
                gameModeResults = DeSerializeClientAbilityResultsFromStream(context, ref stream);
                break;
            }

            return(new ClientMovementResults(context.GameFlowData.FindActorByActorIndex(invalidActorIndex),
                                             triggeringPath, seqStartDataList, effectResults, barrierResults, powerupResults, gameModeResults));
        }