double balance = 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999D;
private IEnumerator GetAvatar()
{
string url = "Ссылка на картинку";
WWW img = new WWW(url);
yield return img;
Image imga = avatar.GetComponent<Image>();
imga.sprite = Sprite.Create((Texture2D)img.texture, new Rect(0, 0, img.texture.width, img.texture.height), Vector2.zero);
}
GetClickTaskReward()
clicksTarget
вместо key
public void GetClickTask()
{
if (!PlayerPrefs.HasKey("Task"))
{
int key = UnityEngine.Random.Range(1, 100);
clicksTarget = CountClickGetter(key);
task_target_text.text = clicksTarget.ToString();
task_progress_text.text = clicks.ToString();
task_type_text.text = "TAP" + clicksTarget.ToString() + "TIMES";
gameHelper = GameObject.FindObjectOfType<GameHelper>();
reward = GetClickTaskReward(key);
if(reward == 0) { reward = 5000; }
task_reward_text.text = gameHelper.FormatMoney(reward);
PlayerPrefs.SetString("ClickTask", "active");
PlayerPrefs.SetString("Task", "a");
}
}
<?
mysql_connect('localhost', 'root', '') or die();
mysql_select_db('data');
$dir = "data/save_img/data/";
$files = array_diff( scandir( $dir), array('..', '.'));
foreach($files AS $i => $filename) {
if (strlen($filename) < 32 && $filename !== '.htaccess') {
$key = md5($filename).".jpg";
$block_n = $dir.$filename;
$block_res = $dir.$key;
rename($block_n, $block_res);
mysql_query("INSERT INTO `img` (`id`, `way`) VALUES (NULL, '$block_res')");
} else {
}
}
?>