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