Example #1
0
 public Identify(string Token, int Intents)
 {
     this.op = 2;
     this.d  = new IdentifyData();
     this.d.SetIntents(Intents);
     this.d.SetToken(Token);
 }
Example #2
0
 public NewSession(Identity identity, Action <string, JsonElement> eventDispatchCallback, ILogger logger) : base(eventDispatchCallback, logger)
 {
     _logger       = logger;
     _identityData = new IdentifyData
     {
         Token      = identity.Token,
         Properties = new IdentifyConnectionProperties
         {
             Os      = OsName,
             Browser = LibraryName,
             Device  = LibraryName,
         },
         Shard   = identity.Shard,
         Intents = identity.Intents,
     };
 }
Example #3
0
 public override string ToString()
 {
     try
     {
         return(GetObjectName());
     }
     catch (Exception ex)
     {
         try
         {
             return(IdentifyData.ToString());
         }
         catch (Exception ex2)
         {
             return("");
         }
     }
 }
Example #4
0
    void Awake()
    {
        //Set the instance only once.
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            //Enforces that there will always be one instance of the GameManager gameObject, this is for type errors prevention.
            Destroy(gameObject);
            Debug.LogWarning("Another instance of GameManager has been created and destoryed!");
        }
        //Get the DB data script ref
        dBData = GetComponent <DBData>();

        //Makes this gameobject not be unloaded when entering a new scene
        DontDestroyOnLoad(this);

        idData = new IdentifyData();

        //Load in idData id there is any
        LoadIdentify();
    }