Пример #1
0
    void Awake()
    {
        Instance = this;

        SocialLogic = new SocialEntityLogic();
        MoodCharacter = new MoodCharacterEntity();
        QuizGame = new QuizeGameEntity { IsQuizeGame = true };
        Achievements = new AchievementLogic();
        HouseTechnology = new HouseTechnologyEntityJeka2();
        HouseActionSocial = new HouseActionSocialEntity();
        Offers = new OffersLogic();
        PhoneEntities = new List<PhoneEntity>();

        AudioL.SetActive(false);
        AudioL.SetActive(true);
    }
Пример #2
0
    public void Load()
    {
        HouseActionSocial = new HouseActionSocialEntity();
        HouseActionSocial.SetListSocialEntity(new List<SocialEntity>());
        HouseTechnology = new HouseTechnologyEntityJeka2();
        SaleMood = new List<int>();
        IdSocialRun = new List<int>();
        HouseActionSocial = new HouseActionSocialEntity();

        #if (!UNITY_EDITOR)
        IsSoundOn =  true;
        IsFirstRun = true;
        #else
        IsSoundOn = false;
        IsFirstRun = true;
        #endif

        IsSound = IsSoundOn;

        MoodCharacter.MoodPeoples = 0.5f;
        MoodCharacter.MoodOO = 0;

        Money = 75000;
        TimeToEndMonth = GameConst.TimeGameMonth;
        QuizGame = new QuizeGameEntity { IsQuizeGame = true };
        Achievements = new AchievementLogic();
        Score = 0;
        NameUser = "";

        FondMoney = 41000;
        //TechnologyTableJeka2.List.Where(t => t.TechnologyLevel == TechnologyLevelEnum.First || t.TechnologyLevel == TechnologyLevelEnum.NoSale).Select(tt => tt.Id).ToList()

        ListResultGame = new List<StatusEndGameEnum>
            {
                StatusEndGameEnum.Non, StatusEndGameEnum.Non, StatusEndGameEnum.Non, StatusEndGameEnum.Non,
                StatusEndGameEnum.Non, StatusEndGameEnum.Non, StatusEndGameEnum.Non, StatusEndGameEnum.Non,
                StatusEndGameEnum.Non, StatusEndGameEnum.Non
            };

        UpdateSpriteRoom();

        HouseActionSocial.Map = Map;
        UIScript.Instance.UpdateProgressBars(true);

        AudioListener.volume = IsSound ? 1f : 0f;

        if (IsFirstRun)
        {
            BaseGUI.instance.comicsPopupScript.EndComicsEvent += comicsPopupScript_EndComicsEvent;
            IsComics = true;
            BaseGUI.instance.OnComicsPopupScript();
        }
        else
        {
            StartMonth();
        }
        BaseGUI.instance.IsTrainingNow = true;
        for (int i = 0; i < 5; i++)
        {
            Offers.GenerateOffer();
        }

        UIScript.Instance.SoundButtonBackground.spriteName = IsSound ? "JKH_sound_on" : "JKH_sound_off";
        UIScript.Instance.NextSoundButton.SetActive(IsSound);

        LoadEnd = true;
        BaseGUI.instance.OnGlobalMenuPopup();

        CurrentAddMoney = 5000;
    }