/// <summary> /// ゲストスタートボタンを押したときの処理 /// </summary> public void PushGuestLogInButton() { //ゲスト用のプレイヤー情報を作成する string name; if (nameField.text == "") { name = "ゲスト"; } else { name = nameField.text; } int rate = 0; int coins = 1000; float possessingItemsPage1 = 0x00011002; float possessingItemsPage2 = 0x00000100; float alignInfo = 0x041815; PossessingItems items = new PossessingItems(possessingItemsPage1, possessingItemsPage2); GameManager.Instance.SetPlayerInfo(0, name, rate, coins, items, alignInfo); GameManager.Instance.LoadScene("MenuScene"); }
/// <summary> /// プレイヤー情報を設定する /// </summary> /// <param name="id"></param> /// <param name="name"></param> /// <param name="rate"></param> /// <param name="coins"></param> /// <param name="items"></param> public void SetPlayerInfo(int id, string name, int rate, int coins, PossessingItems items, float alignInfo) { playerInfo = new PlayerInfo(id, name, rate, coins, items, alignInfo); topAlignInfo = playerInfo.GetAlignInfo(); }