public BoardUnit(Transform parent) { _gameplayManager = GameClient.Get <IGameplayManager>(); _loadObjectsManager = GameClient.Get <ILoadObjectsManager>(); _soundManager = GameClient.Get <ISoundManager>(); _tutorialManager = GameClient.Get <ITutorialManager>(); _timerManager = GameClient.Get <ITimerManager>(); _battlegroundController = _gameplayManager.GetController <BattlegroundController>(); _playerController = _gameplayManager.GetController <PlayerController>(); _animationsController = _gameplayManager.GetController <AnimationsController>(); _battleController = _gameplayManager.GetController <BattleController>(); _actionsQueueController = _gameplayManager.GetController <ActionsQueueController>(); _vfxController = _gameplayManager.GetController <VfxController>(); _ranksController = _gameplayManager.GetController <RanksController>(); _abilitiesController = _gameplayManager.GetController <AbilitiesController>(); _cardsController = _gameplayManager.GetController <CardsController>(); _inputController = _gameplayManager.GetController <InputController>(); _boardArrowController = _gameplayManager.GetController <BoardArrowController>(); GameObject = Object.Instantiate(_loadObjectsManager.GetObjectByPath <GameObject>("Prefabs/Gameplay/BoardCreature")); GameObject.transform.SetParent(parent, false); _fightTargetingArrowPrefab = _loadObjectsManager.GetObjectByPath <GameObject>("Prefabs/Gameplay/Arrow/AttackArrowVFX_Object"); _pictureSprite = GameObject.transform.Find("CreaturePicture").GetComponent <SpriteRenderer>(); _frozenSprite = GameObject.transform.Find("Other/Frozen").GetComponent <SpriteRenderer>(); _glowSprite = GameObject.transform.Find("Other/Glow").GetComponent <SpriteRenderer>(); _shieldSprite = GameObject.transform.Find("Other/Shield").gameObject; _glowSelectedObjectSprite = GameObject.transform.Find("Other/GlowSelectedObject").gameObject; _attackText = GameObject.transform.Find("Other/AttackAndDefence/AttackText").GetComponent <TextMeshPro>(); _healthText = GameObject.transform.Find("Other/AttackAndDefence/DefenceText").GetComponent <TextMeshPro>(); _sleepingParticles = GameObject.transform.Find("Other/SleepingParticles").GetComponent <ParticleSystem>(); _unitContentObject = GameObject.transform.Find("Other").gameObject; _unitContentObject.SetActive(false); _inputController.UnitSelectedEvent += UnitSelectedEventHandler; _inputController.UnitDeselectedEvent += UnitDeselectedEventHandler; BuffsOnUnit = new List <Enumerators.BuffType>(); AttackedBoardObjectsThisTurn = new List <object>(); _glowSprite.gameObject.SetActive(true); _glowSprite.enabled = false; IsCreatedThisTurn = true; UnitStatus = Enumerators.UnitStatusType.NONE; IsAllAbilitiesResolvedAtStart = true; _gameplayManager.CanDoDragActions = false; }
public void Init() { _gameplayManager = GameClient.Get <IGameplayManager>(); _timerManager = GameClient.Get <ITimerManager>(); _loadObjectsManager = GameClient.Get <ILoadObjectsManager>(); _dataManager = GameClient.Get <IDataManager>(); _soundManager = GameClient.Get <ISoundManager>(); _tutorialManager = GameClient.Get <ITutorialManager>(); _uiManager = GameClient.Get <IUIManager>(); _battlegroundController = _gameplayManager.GetController <BattlegroundController>(); _vfxController = _gameplayManager.GetController <VfxController>(); _abilitiesController = _gameplayManager.GetController <AbilitiesController>(); _actionsQueueController = _gameplayManager.GetController <ActionsQueueController>(); _animationsController = _gameplayManager.GetController <AnimationsController>(); _ranksController = _gameplayManager.GetController <RanksController>(); CreatureCardViewPrefab = _loadObjectsManager.GetObjectByPath <GameObject>("Prefabs/Gameplay/Cards/CreatureCard"); SpellCardViewPrefab = _loadObjectsManager.GetObjectByPath <GameObject>("Prefabs/Gameplay/Cards/SpellCard"); OpponentCardPrefab = _loadObjectsManager.GetObjectByPath <GameObject>("Prefabs/Gameplay/Cards/OpponentCard"); _gameplayManager.GameStarted += GameStartedHandler; _gameplayManager.GameEnded += GameEndedHandler; _indexOfCard = -1; }
public void Init() { _gameplayManager = GameClient.Get <IGameplayManager>(); _tutorialManager = GameClient.Get <ITutorialManager>(); _actionsQueueController = _gameplayManager.GetController <ActionsQueueController>(); _abilitiesController = _gameplayManager.GetController <AbilitiesController>(); _vfxController = _gameplayManager.GetController <VfxController>(); FillStrongersAndWeakers(); }
public void Init() { _loadObjectsManager = GameClient.Get <ILoadObjectsManager>(); _gameplayManager = GameClient.Get <IGameplayManager>(); _tutorialManager = GameClient.Get <ITutorialManager>(); _uiManager = GameClient.Get <IUIManager>(); _timerManager = GameClient.Get <ITimerManager>(); _soundManager = GameClient.Get <ISoundManager>(); _vfxController = _gameplayManager.GetController <VfxController>(); _battleController = _gameplayManager.GetController <BattleController>(); _actionsQueueController = _gameplayManager.GetController <ActionsQueueController>(); _cardsController = _gameplayManager.GetController <CardsController>(); _gameplayManager.GameEnded += GameplayManagerGameEnded; }