////////////////////////////////////////// /// 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; }
////////////////////////////////////////// /// 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"); }
public QueuedAction( DefaultModel i_char, AbilityData i_ability ) { m_strCharacterID = i_char.GetPropertyValue<string>( "Name" ); m_dataAbility = i_ability; }
public QueuedAction(DefaultModel i_char, AbilityData i_ability) { m_strCharacterID = i_char.GetPropertyValue <string>("Name"); m_dataAbility = i_ability; }