// Use this for initialization void Start() { _textController = GetComponent <TextController>(); float beastRatio = GameManager.GetInstance().BeastsRatio(); float treeRatio = GameManager.GetInstance().TreesRatio(); if (beastRatio == 0) { _faunaState = State.GOOD; _textController.ChangeParagraph(1, _faunaGoodEnding); } else if (beastRatio < 0.4) { _faunaState = State.HALF; _textController.ChangeParagraph(1, _faunaHalfGoodEnding); } if (treeRatio == 0) { _floraState = State.GOOD; _textController.ChangeParagraph(2, _floraGoodEnding); } else if (treeRatio < 0.33) { _floraState = State.HALF; _textController.ChangeParagraph(2, _floraHalfGoodEnding); } if (_floraState == State.GOOD && _faunaState == State.GOOD) { _textController.ChangeParagraph(3, _goodEnding); } else if (_floraState == State.BAD && _faunaState != State.BAD) { _textController.ChangeParagraph(3, _goodBadEnding); } else if (_floraState != State.BAD && _faunaState == State.BAD) { _textController.ChangeParagraph(3, _badGoodEnding); } else if (_floraState == State.HALF || _faunaState == State.HALF) { _textController.ChangeParagraph(3, _halfEnding); } }