public static bool Reset() { HTTP.Request(Settings.FormAjaxURL("init.php"), delegate(WWW a_Request) { var t_JSON = JSON.Parse(a_Request.text); if (t_JSON["error"].Value != "") { Debug.LogError("'" + t_JSON["error"] + "'"); return; } Player = new PlayerInfo(t_JSON["game_id"].AsInt, t_JSON["name"].Value, t_JSON["cash"].AsDouble, t_JSON["main_team"]["name"].Value); Settings.MusicVolume = t_JSON["music_volume"].AsFloat; Settings.SEVolume = t_JSON["sound_volume"].AsFloat; Champion.Reset(t_JSON["champions"].AsArray); Stats.Reset(); ShopManager.Reset(); ChampionListContent.Reset(); TeamManager.Reset(); Messages.Reset(); Messages.Insert(t_JSON["messages"].AsArray); MessageHandler.Reset(); // Debug.Log("Reset complete, username is '" + Player.Name + "', and has " + Player.Cash + " cash."); }, true); return(true); }
void Start() { m_Element = this; GetComponent <RectTransform>().localPosition = new Vector3(0, 0, 0); }