Пример #1
0
        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;
     }
 }
Пример #3
0
        private void OnBadgeSpawned(BadgeModel badge, bool isVictorious)
        {
            Info.PlayerCanWin = isVictorious;

            if (Info.GameSettings.ConfirmStep == false || Info.ActivePlayer.Type == PlayerTypes.AI)
            {
                GameEvents.StepConfirmed();
            }
        }
Пример #4
0
 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);
 }
Пример #5
0
 private void OnBadgeSpawned(BadgeModel badge, bool isVictorious)
 {
     if (isVictorious)
     {
         _tick = false;
     }
     else
     {
         ValidateTick();
     }
 }
Пример #6
0
 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
     });
 }
Пример #7
0
            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());
                }
            }
Пример #8
0
 public void RemoveBadge(BadgeModel badge)
 {
     _badges.Remove(badge);
 }
Пример #9
0
 public void AddBadge(BadgeModel badge)
 {
     _badges.Add(badge);
 }
Пример #10
0
 private void OnBadgeSpawned(BadgeModel badge, bool isVictorious)
 {
     _spawnPoints.First(x => x.Coordinates == badge.Coordinates).Badge = badge;
 }