Esempio n. 1
0
 public void ShowPlayer(AIPlayerModel player)
 {
     Player                = player;
     _icon.sprite          = player.Icon;
     _nameText.text        = player.Name;
     _descriptionText.text = player.Description;
 }
Esempio n. 2
0
 private void Button_Clicked(AIPlayerModel aiplayer)
 {
     LayersManager.FadeOut(0.25f, () =>
     {
         LayersManager.Push <VersusLayer>().BeginVersus(aiplayer);
         LayersManager.FadeIn(0.25f, null);
     });
 }
 public void Begin(AIPlayerModel aiplayer)
 {
     _player   = new Player("Player");
     _aiPlayer = new AIPlayer(aiplayer);
     _aiPlayer.CustomMessage += _aiPlayer_CustomMessage;
     _battle = new Battle(_player, _aiPlayer);
     BeginInternal();
 }
        public void BeginVersus(AIPlayerModel aIPlayer)
        {
            _aiPlayerIcon.sprite = aIPlayer.Icon;
            _animator.SetBool("Versus", true);


            StartCoroutine(VersusRoutine(() => LayersManager.Push <BattleLayer>().Begin(aIPlayer)));
        }
Esempio n. 5
0
 public AIPlayer(AIPlayerModel player)
 {
     Model    = player;
     Strategy = GameObject.Instantiate(player.Strategy);
     Strategy.CustomMessage += (m) => { if (CustomMessage != null)
                                        {
                                            CustomMessage(m);
                                        }
     };
 }