public void Construct(BadgeModel model) { Model = model; model.SetFacade(this); Renderer.material.renderQueue++; }
private void OnBadgeSpawned(BadgeModel badge, bool isVictorious) { if (Info.GameSettings.ConfirmStep && badge.Owner.Type != PlayerTypes.AI) { MenuManager.OpenMenu(Menus.ConfirmStepWindow); _isOpen = true; } }
private void OnBadgeSpawned(BadgeModel badge, bool isVictorious) { Info.PlayerCanWin = isVictorious; if (Info.GameSettings.ConfirmStep == false || Info.ActivePlayer.Type == PlayerTypes.AI) { GameEvents.StepConfirmed(); } }
private bool CheckBadgeForVictory(BadgeModel badge) { foreach (var line in Info.GameGeometry.Lines.Where(x => x.Contains(badge.Coordinates))) { if (line.All(point => BadgeRegistry.Badges.Any(x => x.Coordinates == point && x.Owner == badge.Owner))) { return(true); } } return(false); }
private void OnBadgeSpawned(BadgeModel badge, bool isVictorious) { if (isVictorious) { _tick = false; } else { ValidateTick(); } }
private void OnBadgeSpawned(BadgeModel badge, bool isVictorious) { _historyItems.Add(new HistoryItem { PlayerName = badge.Owner.Name, BadgeCoordinates = badge.Coordinates, IsBadgeConfirmed = badge.IsConfirmed, PlayerMadeSteps = Info.ActivePlayerMadeSteps, GlobalStep = Info.GlobalStep }); }
private void OnBadgeSpawned(BadgeModel badge, bool isVictorious) { AudioController.Source.PlayOneShot(AudioController.AudioSettings.BadgeSpawnedClip); _badges.ForEach(x => x.Glowing.Stop()); if (Info.ActivePlayerMadeSteps == 0) { _badges.TakeLast(Info.StepSize).ForEach(x => x.Glowing.Play()); } else // > 0 { _badges.TakeLast(Info.ActivePlayerMadeSteps).ForEach(x => x.Glowing.Play()); } }
public void RemoveBadge(BadgeModel badge) { _badges.Remove(badge); }
public void AddBadge(BadgeModel badge) { _badges.Add(badge); }
private void OnBadgeSpawned(BadgeModel badge, bool isVictorious) { _spawnPoints.First(x => x.Coordinates == badge.Coordinates).Badge = badge; }