예제 #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);
        }
예제 #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());
            }
        }
예제 #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();
        }
예제 #4
0
 public void Init(LevelSettings settings, BattleSceneController scene)
 {
     enemiesConfig     = settings.enemies;
     currentTimeToWait = config.startSeconds;
     scene.BattleOver += BattleOver;
 }