public static void SaveInTime()
 {
     if (TheGame.GetComponent <GameData>() != null)
     {
         TheGame.GetComponent <GameData>().ResetTimeToSave();
     }
 }
 public static void Save()
 {
     if (TheGame.GetComponent <GameData>() != null)
     {
         TheGame.GetComponent <GameData>().SaveToFile();
     }
 }
Example #3
0
        public static String GetNameSprite(TypeDataModel typeData)
        {
            var info = TheGame.GetComponent <GameDataModel>();

            if (info == null)
            {
                return(null);
            }

            return(info._data[typeData].GetNameSprite());
        }
Example #4
0
        public static List <IGameDataParticleModel> GetData(TypeDataModel typeData)
        {
            var info = TheGame.GetComponent <GameDataModel>();

            if (info == null)
            {
                return(null);
            }

            return(info._data[typeData].GetData());
        }
        public static void AddActionForRewardVideo(Action onActionGetReward)
        {
            var ads = TheGame.GetComponent <Admob>();

            if (ads == null)
            {
                return;
            }

            ads.OnActionRewardedUser = onActionGetReward;
        }
        public static void ShowRewardVideo()
        {
            var ads = TheGame.GetComponent <Admob>();

            if (ads == null)
            {
                return;
            }

            ads.ShowRewardedAd();
        }
        public static void LoadingBanner()
        {
            var ads = TheGame.GetComponent <Admob>();

            if (ads == null)
            {
                return;
            }

            ads.RequestBanner();
        }
        public static void LoadingRewardVideo()
        {
            var ads = TheGame.GetComponent <Admob>();

            if (ads == null)
            {
                return;
            }

            ads.RequestRewardBasedVideo();
            ads.RequestBanner();
        }
Example #9
0
        public void Save()
        {
            if (TheGame.GetComponent <GamePlayer>() == null)
            {
                return;
            }

            _playerDataModel        = TheGame.GetComponent <GamePlayer>().GetPlayerData();
            _playerDataModel.langId = (int)Lang.Instance.CurLang;

            var serializedOutput = JsonUtility.ToJson(_playerDataModel);

            FileUtils.SaveTextToFile(_fileName, serializedOutput);

            Debug.Log("Save Game");
        }
        public static PlayerDataModel GetPlayerData()
        {
            var p = TheGame.GetComponent <GameData>();

            if (p == null)
            {
                return(null);
            }

            if (p._playerDataModel == null)
            {
                p._playerDataModel = new PlayerDataModel();
                p._playerDataModel.Init();
            }

            return(p._playerDataModel);
        }
Example #11
0
 public void SaveGame()
 {
     TheGame.GetComponent <GameData>().SaveTime();
 }
Example #12
0
        public override void Init()
        {
            var playerData = TheGame.GetComponent <GameData>().GetPlayerData();

            _playerDataModel = playerData;
        }