public override void ReceiveMessage(TeamMessage message)
 {
     if ((message.messageType == TeamMessageTypes.UnderFire) && (message.content != null))
     {
         MessageContentUnderFire content = (MessageContentUnderFire)message.content;
         underFireCell = content.position;
     }
 }
Example #2
0
 public void SendMessage(TeamRoleBase sender, TeamMessage message)
 {
     members.ForEach(r => {
         if (r != sender)
         {
             r.ReceiveMessage(message);
         }
     });
 }
 public override void ReceiveMessage(TeamMessage message)
 {
     if ((message.messageType == TeamMessageTypes.EnemyLocated) && (message.content != null))
     {
         MessageContentEnemyLocated content = (MessageContentEnemyLocated)message.content;
         content.positions.ForEach(v => {
             Cell cell = v.ToCell();
             AddReportedEnemyPosition(cell);
         });
     }
     else if ((message.messageType == TeamMessageTypes.UnderFire) && (message.content != null))
     {
         MessageContentUnderFire content = (MessageContentUnderFire)message.content;
         underFireCell = content.position;
     }
 }
 public abstract void ReceiveMessage(TeamMessage message);