Ejemplo n.º 1
0
        public void Login(string email, string password, Action <PlayerActionResponse> onSuccess)
        {
            var body = new LoginRequest
            {
                email    = email,
                password = password
            };

            serverAPI.DoPost("/auth/login", body, onSuccess);
        }
        private void StartExpedition()
        {
            Debug.Log("Start Button clicked");
            loading = true;
            startButton.interactable = false;
            startButtonText.enabled  = false;
            loadingIndicator.enabled = true;

            var team = new Team
            {
                type      = TEAM_TYPE,
                vehicleId = vehicleAvatarPrefab.Vehicle.id,
                hero1Id   = hero1?.id,
                hero2Id   = hero2?.id,
                hero3Id   = hero3?.id,
                hero4Id   = hero4?.id
            };

            serverAPI.DoPost($"/expedition/{expedition.id}/start", team, response =>
            {
                Destroy(gameObject);
            });
        }
Ejemplo n.º 3
0
 public void ClaimDaily(int day, Action <PlayerActionResponse> onSuccess = null)
 {
     serverAPI.DoPost($"/oddjob/daily/{day}", null, onSuccess);
 }
Ejemplo n.º 4
0
 public void StartMission(StartMissionRequest request, Action <PlayerActionResponse> onSuccess = null)
 {
     serverAPI.DoPost("/battle/mission", request, onSuccess);
 }
Ejemplo n.º 5
0
        public void ChangeMapTo(long mapId, Action <PlayerActionResponse> onSuccess = null)
        {
            var mapKnown = PlayerMaps.Find(m => m.mapId == mapId) != null;

            serverAPI.DoPost($"/map/{mapId}/{(mapKnown ? "current" : "discover")}", null, onSuccess);
        }
Ejemplo n.º 6
0
 public void ClaimTask(TaskCluster cluster, Action <PlayerActionResponse> onSuccess = null)
 {
     serverAPI.DoPost($"/tasks/claim/{cluster.id}", null, onSuccess);
 }
Ejemplo n.º 7
0
 public void Claim(InboxMessage message, Action <PlayerActionResponse> onSuccess = null)
 {
     serverAPI.DoPost($"/inbox/claim/{message.id}", null, onSuccess);
 }
Ejemplo n.º 8
0
 public void FinishPlayerExpedition(PlayerExpedition playerExpedition, Action <PlayerActionResponse> onSuccess = null)
 {
     serverAPI.DoPost($"/expedition/{playerExpedition.id}/finish", null, onSuccess);
 }
Ejemplo n.º 9
0
 public void Breakdown(List <long> gearIds, Action <PlayerActionResponse> onSuccess = null)
 {
     serverAPI.DoPost("/forge/breakdown", new Breakdown {
         gearIds = gearIds, silent = true
     }, onSuccess);
 }