/// <summary> /// /// Initialises a status effect indicator on a unit counter /// /// </summary> public void InitIndicator(TileStatuses _tileStatus, int sourcePlayerId) { tileStatus = _tileStatus; statusColour.color = GameManager.instance.colourManager.GetTileStatusColour(tileStatus); sourcePlayerText.text = sourcePlayerId.ToString(); }
public void AddTileStatus(TileStatuses tileStatus, int sourcePlayerId) { if (!cellTileStatuses.Any(x => x.Key == tileStatus && x.Value == sourcePlayerId)) { cellTileStatuses.Add(new KeyValuePair <TileStatuses, int>(tileStatus, sourcePlayerId)); RefreshTileStatus(); switch (tileStatus) { case TileStatuses.Survey: if (occupantCounter != null) { occupantCounter.Unit.Unstealth(); } GameManager.instance.CheckWarden(); break; case TileStatuses.Earthquake: if (occupantCounter != null) { occupantCounter.Unit.DamageUnit(GameManager.instance.GetPlayer(sourcePlayerId), EARTHQUAKE_DAMAGE); } //Need to add movement cost modifier in here break; case TileStatuses.WallOfFire: if (occupantCounter != null) { occupantCounter.Unit.DamageUnit(GameManager.instance.GetPlayer(sourcePlayerId), WALL_OF_FIRE_DAMAGE); } break; case TileStatuses.Sanctuary: if (occupantCounter != null) { if (occupantCounter.Unit.Owner.Id == sourcePlayerId) { occupantCounter.Unit.HealUnit(SANCTUARY_HEAL); } } break; case TileStatuses.Consecrate: if (occupantCounter != null) { if (occupantCounter.Unit.Owner.Id != sourcePlayerId) { occupantCounter.Unit.DamageUnit(GameManager.instance.GetPlayer(sourcePlayerId), CONSECREATE_DAMAGE); } } break; } } }
/// <summary> /// /// Obtain a particular tile status colour /// /// </summary> public Color GetTileStatusColour(TileStatuses tileStatus) { var tileStatusColour = new Color(); tileStatusColour = tileStatusColours.FirstOrDefault(x => x.tileStatus == tileStatus).statusColour; if (tileStatusColour == null) { tileStatusColour = new Color(); } return(tileStatusColour); }
public void SetTileStatusMode(TileStatuses tileStatus) { ActiveEffect = ActiveEffectTypes.TileStatus; SelectedTileStatus = tileStatus; }