private void Awake() { _instance = this; UnityInitializer.AttachToGameObject(this.gameObject); AWSConfigs.HttpClient = AWSConfigs.HttpClientOption.UnityWebRequest; // CognitoAWSCredentials credentials = new CognitoAWSCredentials( //"eu-central-1:41fdc6a2-cac8-4e0f-8ff1-3d745a81ccf5", // Identity Pool ID // RegionEndpoint.EUCentral1// Region // ); //AmazonS3Client S3Client = new AmazonS3Client(credentials, _S3Region); /*S3Client.ListBucketsAsync(new ListBucketsRequest(), (responseObject) => * { * if (responseObject.Exception == null) * { * * responseObject.Response.Buckets.ForEach((s3b) => * { * Debug.Log("Bucket name:" + s3b.BucketName); * }); * } * else * { * Debug.Log("AWS ERROR :" + responseObject.Exception); * } * });*/ }
private void Awake() { _instance = this; UnityInitializer.AttachToGameObject(this.gameObject); AWSConfigs.HttpClient = AWSConfigs.HttpClientOption.UnityWebRequest; //CognitoAWSCredentials credentials = new CognitoAWSCredentials( // "ap-south-1:f1b44440-6440-4aa1-8db8-e93522a00cd2", // Identity Pool ID // _S3Region // Region // ); //_s3Client = new AmazonS3Client(credentials, _S3Region); //S3Client.ListBucketsAsync(new ListBucketsRequest(), (responseObject) => //{ // if (responseObject.Exception == null) // { // responseObject.Response.Buckets.ForEach((s3b) => // { // Debug.Log("Bucket Name: " + s3b.BucketName); // }); // } // else // { // Debug.Log("Got AWS Exception: " + responseObject.Exception); // } //}); }
void Start() { awsManager = AWSManager.instance; xmlManager = XMLManager.ins; csvManager = CSVManager.instance; jsonAdapter = JsonAdapter.instance; }
private void Awake() { _instance = this; UnityInitializer.AttachToGameObject(this.gameObject); AWSConfigs.HttpClient = AWSConfigs.HttpClientOption.UnityWebRequest; // For obtain credentials // https://docs.aws.amazon.com/mobile/sdkforunity/developerguide/setup-unity.html // To obtain my identify Pool ID // https://us-east-2.console.aws.amazon.com/cognito/pool/edit/?region=us-east-2&id=us-east-2:d2f8c75d-d231-496d-a4ec-1a50920351fd //CognitoAWSCredentials credentials = // AmazonS3Client S3Client = new AmazonS3Client(credentials, _S3Region); // ResultText is a label used for displaying status information /* * S3Client.ListBucketsAsync(new ListBucketsRequest(), (responseObject) => * { * * if (responseObject.Exception == null) * { * responseObject.Response.Buckets.ForEach((s3b) => * { * Debug.Log("Bucket Name : " + s3b.BucketName); * }); * } * else * { * Debug.Log("AWS ERROR : " + responseObject.Exception); * } * }); */ }
public void Refresh() { friendSendInfo.Clear(); friendReceiveInfo.Clear(); friendListInfo.Clear(); awsManager = AWSManager.instance; userInfo = AWSManager.instance.userInfo; styleText.text = userInfo.profile_style; nicknameText.text = userInfo.nickname; profileImage.sprite = Resources.Load <Sprite>("Icon/Skin/" + userInfo.profile_skin); userFriends = awsManager.userFriend; searchInfos = awsManager.allUserInfo.ToList(); for (int i = 0; i < userFriends.Count; i++) { Debug.Log(userFriends[i].nickname_friend); /* * UserInfo friend = null; * for (int j = 0; j < searchInfos.Count; j++) * { * * if (searchInfos[j].nickname == userFriends[i].nickname_friend) * { * friend = searchInfos[j]; * Debug.Log(friend.nickname); * break; * } * } */ UserInfo friend = searchInfos.Find((x) => x.nickname == userFriends[i].nickname_friend); if (userFriends[i].state == 0) { friendSendInfo.Add(friend); searchInfos.Remove(friend); } else if (userFriends[i].state == 1) { friendReceiveInfo.Add(friend); searchInfos.Remove(friend); } else if (userFriends[i].state == 2) { friendListInfo.Add(friend); searchInfos.Remove(friend); } } friendText.text = friendListInfo.Count + "[" + friendReceiveInfo.Count + "]/999"; Search_Friend(); //검색 이름에 있는 이름으로 친구 리스트를 생성 RefreshListView(); //내 친구목록 리스트를 생성함과 동시에 친구목록으로 이동 GetHeartReceive(); }
private void Awake() { _instance = this; UnityInitializer.AttachToGameObject(this.gameObject); AWSConfigs.HttpClient = AWSConfigs.HttpClientOption.UnityWebRequest; //ListBuckets(); }
void Awake() { if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
void Start() { //PlayerPrefs.SetInt("tutorial",1); //PlayerPrefs.SetInt("tutorial", IslandData.tutorial + 1);//튜토리얼 건너 뛰기 awsManager = AWSManager.instance; xmlManager = XMLManager.ins; jsonAdapter = JsonAdapter.instance; xmlManager.LoadItems();//if xml file not exist create it. jsonAdapter.GetAllUserInfo(WebRequestCallback); jsonAdapter.GetAllEditorMap(WebRequestCallback); }
private void Start() { bgmSlider.value = PlayerPrefs.GetFloat("bgmVolumn", 1); sfxSlider.value = PlayerPrefs.GetFloat("sfxVolumn", 1); awsManager = AWSManager.instance; gameManager = GameManager.instance; xmlManager = XMLManager.ins; //Debug.Log(awsManager.user.nickname + " : " + awsManager.user.boong +","+ awsManager.user.heart); }
public void PlayButton() { AWSManager aws = AWSManager.instance; for (int i = 0; i < aws.editorMap.Count; i++) { if (aws.editorMap[i].itemdata.title == itemdata.title) { GameManager.instance.customMap = aws.editorMap[i].map; SceneManager.LoadScene("CustomMapPlayScene");//customMode Scene break; } } }
public Style(string styleText, string styleInfo, string type_, string con_, int standard_, int boong, int heart, string item) { style_text = styleText; style_info = styleInfo; type = type_; condition = con_; standard = standard_; reward_boong = boong; reward_heart = heart; reward_item = item; awsManager = AWSManager.instance; }
void Awake() { _instance = this; UnityInitializer.AttachToGameObject(this.gameObject); AWSConfigs.HttpClient = AWSConfigs.HttpClientOption.UnityWebRequest; var request = new ListObjectsRequest() { BucketName = "jwassetbundles" }; GetObjects(); }
//public string S3Region = RegionEndpoint.USEast2.SystemName; //private RegionEndPoint _S3Region //{ // get { return RegionEndPoint.GetBySystemName(S3Region); } //} // private AmazonS3Client _s3Client; //public AmazonS3Client S3Client // { //get // { //if(_s3Client == null) // { //AmazonS3Client S3Client = new AmazonS3Client(new CognitoAWSCredentials( // "IDENTITY_POOL_ID",//Identity Pool ID // RegionaEndPoint.ESEast2//Region // );,_S3Region); // } // return _s3Client; // } // } private void Awake() { _instance = this; //UnityInitializer.AttachToGameObject(this.gameObject); //AWSConfigs.HttpClient = AWSConfigs.HttpClientOption.UnityWebRequest; //S3Client.ListBucketsAsync(new ListBucketsRequest(), (responseObject) => //{ // if (responseObject.Exception == null) // { // responseObject.Response.Buckets.ForEach((s3b) => // { // Debug.Log("Bucket Name: " + s3b.BucketName); // }); // } // else // { // Debug.Log("AWS Error" + responseObject.Excpetion); // } //}); }
private void Awake() { _instance = this; UnityInitializer.AttachToGameObject(this.gameObject); AWSConfigs.HttpClient = AWSConfigs.HttpClientOption.UnityWebRequest; /*S3Client.ListBucketsAsync(new ListBucketsRequest(), (responseObject) => * { * if (responseObject.Exception == null) * { * responseObject.Response.Buckets.ForEach((s3b) => * { * Debug.Log("Bucket name: " + s3b.BucketName); * * }); * } * else * { * Debug.Log("AWS ERROR" + responseObject.Exception); * } * });*/ }
void Awake() { if (instance == null) { Debug.Log("Single instance is null"); instance = this; } else if (instance != this) { Debug.Log("Single instance is not Single.. Destroy gameobject!"); Destroy(gameObject); } DontDestroyOnLoad(gameObject); //Dont destroy this singleton gameobject :( UnityInitializer.AttachToGameObject(this.gameObject); // Amazon Initialize AWSConfigs.HttpClient = AWSConfigs.HttpClientOption.UnityWebRequest; //Bug fix code Credentials.GetIdentityIdAsync(delegate(AmazonCognitoIdentityResult <string> result) { if (result.Exception != null) { Debug.Log(result.Exception);//Exception!! } else { Debug.Log("GetIdentityID" + result.Response); } }); dbClient = new AmazonDynamoDBClient(Credentials, RegionEndpoint.APNortheast2); dbContext = new DynamoDBContext(dbClient); //credentials.ClearIdentityCache(); //credentials.ClearCredentials(); }
public void GetReward(RewardPopup popup) { aws = AWSManager.instance; copy_user = aws.userInfo.DeepCopy(); copy_history = aws.userHistory.DeepCopy(); userReward = new UserReward(aws.userInfo.nickname, island * 3 + star_index); rewardPopup = popup; copy_user.boong += boong; copy_user.heart += heart; copy_user.block_powder += block_powder; copy_user.skin_powder += skin_powder; copy_history.boong_get += boong; copy_history.heart_get += heart; JsonAdapter.RewardRequest rewardRequest = new JsonAdapter.RewardRequest(copy_user, copy_history, userReward, userInventory); JsonAdapter.instance.GetReward(rewardRequest, WebCallback); }