// Start is called before the first frame update void Start() { if (ApplicationManager.Instance?.SelectedPlant != null) { _plantCharacter.SetPlant(ApplicationManager.Instance.SelectedPlant); _nameText.text = ApplicationManager.Instance.SelectedPlant.Name; } }
private void Start() { if (ApplicationManager.Instance?.SelectedPlant != null) { // _plantCharacter.PlantSprite = ApplicationManager.Instance.SelectedPlant.Sprite; _plantCharacter.SetPlant(ApplicationManager.Instance.SelectedPlant); } _growthBar.FillAmount = 0; _mainCameraAnimator.Play(CameraAnimatorStartGameState); _mainCameraAnimator.speed = 0; _gameState = GameState.StartScreen; _leftCopyOfPlantCharacter = Instantiate(_plantCharacter); _leftCopyOfPlantCharacter.enabled = false; _rightCopyOfPlantCharacter = Instantiate(_plantCharacter); _rightCopyOfPlantCharacter.enabled = false; }
private void UpdateView() { _plantCharacter.SetPlant(_plantOptions[_plantIndex]); _plantNameText.text = _plantOptions[_plantIndex].name; _plantIndexText.text = $"{_plantIndex+1} / {_plantOptions.Length}"; }