TeamSelection.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 2.0.1
  4. *
  5. * Do not make changes to this file unless you know what you are doing--modify
  6. * the SWIG interface file instead.
  7. * ----------------------------------------------------------------------------- */
  8. namespace RakNet {
  9. using System;
  10. using System.Runtime.InteropServices;
  11. public class TeamSelection : IDisposable {
  12. private HandleRef swigCPtr;
  13. protected bool swigCMemOwn;
  14. internal TeamSelection(IntPtr cPtr, bool cMemoryOwn) {
  15. swigCMemOwn = cMemoryOwn;
  16. swigCPtr = new HandleRef(this, cPtr);
  17. }
  18. internal static HandleRef getCPtr(TeamSelection obj) {
  19. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  20. }
  21. ~TeamSelection() {
  22. Dispose();
  23. }
  24. public virtual void Dispose() {
  25. lock(this) {
  26. if (swigCPtr.Handle != IntPtr.Zero) {
  27. if (swigCMemOwn) {
  28. swigCMemOwn = false;
  29. RakNetPINVOKE.delete_TeamSelection(swigCPtr);
  30. }
  31. swigCPtr = new HandleRef(null, IntPtr.Zero);
  32. }
  33. GC.SuppressFinalize(this);
  34. }
  35. }
  36. public TeamSelection() : this(RakNetPINVOKE.new_TeamSelection__SWIG_0(), true) {
  37. }
  38. public TeamSelection(JoinTeamType itt) : this(RakNetPINVOKE.new_TeamSelection__SWIG_1((int)itt), true) {
  39. }
  40. public TeamSelection(JoinTeamType itt, TM_Team param) : this(RakNetPINVOKE.new_TeamSelection__SWIG_2((int)itt, TM_Team.getCPtr(param)), true) {
  41. }
  42. public TeamSelection(JoinTeamType itt, byte param) : this(RakNetPINVOKE.new_TeamSelection__SWIG_3((int)itt, param), true) {
  43. }
  44. public JoinTeamType joinTeamType {
  45. set {
  46. RakNetPINVOKE.TeamSelection_joinTeamType_set(swigCPtr, (int)value);
  47. }
  48. get {
  49. JoinTeamType ret = (JoinTeamType)RakNetPINVOKE.TeamSelection_joinTeamType_get(swigCPtr);
  50. return ret;
  51. }
  52. }
  53. public static TeamSelection AnyAvailable() {
  54. TeamSelection ret = new TeamSelection(RakNetPINVOKE.TeamSelection_AnyAvailable(), true);
  55. return ret;
  56. }
  57. public static TeamSelection SpecificTeam(TM_Team specificTeamToJoin) {
  58. TeamSelection ret = new TeamSelection(RakNetPINVOKE.TeamSelection_SpecificTeam(TM_Team.getCPtr(specificTeamToJoin)), true);
  59. return ret;
  60. }
  61. public static TeamSelection NoTeam(byte noTeamSubcategory) {
  62. TeamSelection ret = new TeamSelection(RakNetPINVOKE.TeamSelection_NoTeam(noTeamSubcategory), true);
  63. return ret;
  64. }
  65. }
  66. }
粤ICP备19079148号