Esempio n. 1
0
    public void TransportFinished()
    {
        if (_outOfTimeOrEnergy)
        {
            _playerAction.TakeMotivation(INST_MOTIVATION_OUT_TRANSPORT);
        }

        _playerAction.TakeEnergy(_energyToConsume);
        if (_targetPlace == Place.Home)
        {
            GameManager.Instance.HomeToMap();
            _playerTransport.BackHome();
            _switchScene.DispleyMap(false);
        }
        else
        {
            _playerTransport.Transport(_targetPlace);
            if (!_targetPlaceId.Equals(string.Empty))
            {
                if (_placesController.PlacesDic.ContainsKey(_targetPlaceId))
                {
                    OnClickSwitchScene scene = _placesController.PlacesDic[_targetPlaceId].SwitchScene;
                    switch (scene)
                    {
                    case OnClickSwitchScene.ClothingScene:
                        _switchScene.DisplayPlaceClothing(true);
                        break;

                    case OnClickSwitchScene.FoodScene:
                        _switchScene.DisplayPlaceFood(true);
                        break;

                    case OnClickSwitchScene.MysticScene:
                        _switchScene.DisplayPlaceMystic(true);
                        break;

                    case OnClickSwitchScene.ParkScene:
                        _switchScene.DisplayPlacePark(true);
                        break;

                    case OnClickSwitchScene.SellScene:
                        _switchScene.DisplayPlaceMaterial(true);
                        break;

                    case OnClickSwitchScene.TeacherScene:
                        _switchScene.DisplayPlaceTeacher(true);
                        break;

                    case OnClickSwitchScene.UniversityScene:
                        _switchScene.DisplayPlaceUniversity(true);
                        break;

                    case OnClickSwitchScene.TreasureScene:
                        _switchScene.OpeningTreasure();
                        ActiveTrasureAnimation(true);
                        _treasureController.Explore();
                        break;

                    default:
                        break;
                    }
                }
            }
        }
    }