public void SyncStructureStats(Structure s) { Net_SyncStructure msg = new Net_SyncStructure(); msg.baseHealth = s.BaseHealth; msg.controllerIsP1 = PlayerIsP1(s.Controller); msg.health = s.Health; msg.sourceCardId = cardMap.Get(s.SourceCard); RelayMessage(msg); }
public void RecieveStructureStats(Net_SyncStructure msg) { Structure s = (cardMap.Get(msg.sourceCardId) as StructureCard).Structure; s.RecieveStatsFromNet(msg.health, msg.baseHealth, msg.controllerIsP1 ? GetPlayer1() : GetPlayer2()); }