示例#1
0
    //////////////////////////////////////////
    /// UpdateUI()
    /// Updates the UI for this manager based
    /// on whose turn it is and how many moves
    /// they have left to make.
    //////////////////////////////////////////
    private void UpdateUI()
    {
        // get the name to display of whose turn it is
        string strName = m_modelCurrentCharacter.GetPropertyValue <string>("Name");

        // format the help text with the current character's turn and # of moves left to make
        string strTurnText = StringTableManager.Get("TURN_TEXT");

        strTurnText = DrsStringUtils.Replace(strTurnText, "NAME", strName);
        strTurnText = DrsStringUtils.Replace(strTurnText, "NUM", m_nMovesLeft);

        TurnText.text = strTurnText;
    }
示例#2
0
    //////////////////////////////////////////
    /// OnMoveMade()
    /// Callback for when a player choses a
    /// game piece on the board.
    //////////////////////////////////////////
    private void OnGamePiecePicked(GamePiece_Draft i_piece)
    {
        // what resource did this game piece represent?
        AbilityColors eResource = i_piece.GetColor();

        // grant a resource to whomever is the current player
        DefaultModel dataChar      = TurnManager.Instance.GetCurrentCharacter();
        string       strMessageKey = "GainResource_" + dataChar.GetPropertyValue <string>("Name");

        Messenger.Broadcast <AbilityColors>(strMessageKey, eResource);

        // a valid move has been taken, so send out a message
        Messenger.Broadcast("MoveMade");
    }
示例#3
0
 public QueuedAction( DefaultModel i_char, AbilityData i_ability ) {
     m_strCharacterID = i_char.GetPropertyValue<string>( "Name" );
     m_dataAbility = i_ability;
 }
示例#4
0
 public QueuedAction(DefaultModel i_char, AbilityData i_ability)
 {
     m_strCharacterID = i_char.GetPropertyValue <string>("Name");
     m_dataAbility    = i_ability;
 }