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();
     }
 }
예제 #3
0
        public static String GetNameSprite(TypeDataModel typeData)
        {
            var info = TheGame.GetComponent <GameDataModel>();

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

            return(info._data[typeData].GetNameSprite());
        }
예제 #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();
        }
예제 #9
0
파일: GameData.cs 프로젝트: koderon/theGame
        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);
        }
예제 #11
0
 public void SaveGame()
 {
     TheGame.GetComponent <GameData>().SaveTime();
 }
예제 #12
0
        public override void Init()
        {
            var playerData = TheGame.GetComponent <GameData>().GetPlayerData();

            _playerDataModel = playerData;
        }