private void HandleUnitPlaced(UnitPlacedEvent e) { //Check if the unit still can be placed. If not, we need to clear the selection. if (UnitManager.GetPlacementAmountForUnit(placementRank) <= 0) { placementRank = UnitRank.Unknown; } }
private void HandleUnitPlaced(UnitPlacedEvent e) { if (CurrentMode.Equals(GameMode.PlayerOne) || CurrentMode.Equals(GameMode.PlayerOneSetup)) { PlayerOne.Pieces.Add(e.Unit); } else if (CurrentMode.Equals(GameMode.PlayerTwo) || CurrentMode.Equals(GameMode.PlayerTwoSetup)) { PlayerTwo.Pieces.Add(e.Unit); } }
private void HandleUnitPlaced(UnitPlacedEvent e) { if (e.Unit.Rank.Equals(rank)) { int amount = UnitManager.GetPlacementAmountForUnit(rank); remaining.text = amount.ToString(); if (amount <= 0) { image.color = DISABLED_COLOR; background.color = NORMAL_COLOR; selected = false; } } }