Esempio n. 1
0
        private void Inject(BattleSceneController scene, GameStateController game)
        {
            this.scene        = scene;
            this.game         = game;
            scene.BattleOver += OnBattleOver;

            gameObject.SetActive(false);

            text.text = string.Format(msg, game.CurrentRun.Floor);
            button.onClick.AddListener(Advance);
        }
Esempio n. 2
0
        private void Inject(BattleSceneController controller)
        {
            this.controller = controller;

            cg = GetComponent <CanvasGroup>();

            this.controller.BattleOver += OnBattleOver;

            foreach (var card in GetComponentsInChildren <CardDisplay>())
            {
                card.SetCard(deck.Draw());
            }
        }
Esempio n. 3
0
        private void Inject(BattleSceneController scene, GameStateController game)
        {
            this.scene = scene;
            this.game  = game;
            cg         = GetComponent <CanvasGroup>();

            cg.alpha        = 0;
            cg.interactable = false;

            displays = GetComponentsInChildren <CardDisplay>().ToList();
            int i = 0;

            foreach (var card in GenerateCards())
            {
                displays[i].SetCard(card);
                i++;
            }
            OnInit();
        }
Esempio n. 4
0
 public void Init(LevelSettings settings, BattleSceneController scene)
 {
     enemiesConfig     = settings.enemies;
     currentTimeToWait = config.startSeconds;
     scene.BattleOver += BattleOver;
 }