public LoginResultData GetLoginResultInfo(UserLoginInfo UserLoginInfo) { List <CreateRoleTable> allCreateRoles = CreateRoleTableInstance.GetActorList(); List <ActorTable> allActors = ActorTableInstance.GetActorList(); int playerSelectRole = Random.Range(0, CreateRoleTableInstance.Count); ActorTable actorTable = ActorTableInstance.GetData(allCreateRoles[playerSelectRole].ActorTable_DataID); ActorJobTypeTable actorJobType = ActorJobTypeTableInstance.GetData(actorTable.ActorJobTypeTable_DataID); LoginData loginData = new LoginData() { UserName = UserLoginInfo.UserName, Password = UserLoginInfo.Password, ActorTable_DataID = actorTable.DataID }; LoginTest loginTest = new LoginTest(); PlayerTable reslutTable = loginTest.OnLogin(loginData); CurrentPlayer.SetInstance(reslutTable); LoginResultData loginResultData = new LoginResultData(); loginResultData.Success = true; return(loginResultData); }
public static bool UpdateData(PlayerTable newValue) { return(SingleInstance.UpdateData(newValue)); }
public static void SetInstance(PlayerTable playerTable) { SingleInstance.Instance = playerTable; }