Пример #1
0
    /** "Channel" phase */
    CGTurnState Phase1()
    {
        Debug.Log("Phase 1: Channel phase");

        //SendPhaseTransition("Channel step");

        List <SpellChannelData> commandData = new List <SpellChannelData>();

        foreach (CGCardObject card in m_activePlayer.GetSpells())
        {
            // Channel the spell
            card.ChannelSpell();

            // Send channel data to client
            SpellChannelData data = new SpellChannelData();
            data.cardID     = card.m_cardID;
            data.playerID   = m_activePlayerID;
            data.newChannel = card.GetTimeRemaining();
            commandData.Add(data);
        }

        CGC_ChannelSpell command = new CGC_ChannelSpell(commandData);

        m_connection.TransmitStream(command.PackCommand(), 0);
        m_connection.TransmitStream(command.PackCommand(), 1);

        ResolveStack();

        return(CGTurnState.DEFAULT);
    }
Пример #2
0
    /** "Channel" phase */
    CGTurnState Phase1()
    {
        Debug.Log("Phase 1: Channel phase");
        List <SpellChannelData> commandData = new List <SpellChannelData>();

        foreach (CGCardObject card in m_activePlayer.GetSpells())
        {
            card.ChannelSpell();

            SpellChannelData data = new SpellChannelData();
            data.cardID     = card.m_cardID;
            data.playerID   = m_activePlayerID;
            data.newChannel = card.GetTimeRemaining();
            commandData.Add(data);
        }

        CGC_ChannelSpell command = new CGC_ChannelSpell(commandData);

        CGVisualManager.instance.AddCommand(command);

        ResolveStack();

        return(CGTurnState.DEFAULT);
    }