コード例 #1
0
    private void SpawnEvents()
    {
        GameNetworkEvent _event = new GameNetworkEvent(_localUser.userID, _locationStatus.GetLocationLat(), _locationStatus.GetLocationLon());

        StartCoroutine(_gameNetwork.GetEvent("https://harryspotter.eu.ngrok.io/getEvents", _event.Serialize().ToString(), GetEventResults));
        _originalEventSpawnPoseLat = _locationStatus.GetLocationLat();
        _originalEventSpawnPoseLon = _locationStatus.GetLocationLon();
    }
コード例 #2
0
    private IEnumerator InitializeEvent()
    {
        yield return(new WaitUntil(() => _locationStatus.GetLocationLat() != "0" && _locationStatus.GetLocationLon() != "0"));

        GameNetworkEvent _event = new GameNetworkEvent(_localUser.userID, _locationStatus.GetLocationLat(), _locationStatus.GetLocationLon());

        StartCoroutine(_gameNetwork.GetEvent("https://harryspotter.eu.ngrok.io/getEvents", _event.Serialize().ToString(), GetEventResults));
        _originalEventSpawnPoseLat = _locationStatus.GetLocationLat();
        _originalEventSpawnPoseLon = _locationStatus.GetLocationLon();
    }
コード例 #3
0
    void Start()
    {
        _areThereEvents = false;
        //Make the call to backend to get event
        if (_pcDebugMod == true)
        {
            GameNetworkEvent _event = new GameNetworkEvent("ff81b218-c1d3-11ea-81e3-f3d73c97a2c0", "-0.0206224", "51.4978606");
            StartCoroutine(_gameNetwork.GetEvent("https://harryspotter.eu.ngrok.io/getEvents", _event.Serialize().ToString(), GetEventResults));
        }
        else
        {
            StartCoroutine(InitializeEvent());
        }

        //SpawnEvent();
    }
コード例 #4
0
 void Start()
 {
     singleton = this;
     _ne       = GetComponent <GameNetworkEvent>();
 }