예제 #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);
            });
        }
예제 #3
0
 public void ClaimDaily(int day, Action <PlayerActionResponse> onSuccess = null)
 {
     serverAPI.DoPost($"/oddjob/daily/{day}", null, onSuccess);
 }
예제 #4
0
 public void StartMission(StartMissionRequest request, Action <PlayerActionResponse> onSuccess = null)
 {
     serverAPI.DoPost("/battle/mission", request, onSuccess);
 }
예제 #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);
        }
예제 #6
0
 public void ClaimTask(TaskCluster cluster, Action <PlayerActionResponse> onSuccess = null)
 {
     serverAPI.DoPost($"/tasks/claim/{cluster.id}", null, onSuccess);
 }
예제 #7
0
 public void Claim(InboxMessage message, Action <PlayerActionResponse> onSuccess = null)
 {
     serverAPI.DoPost($"/inbox/claim/{message.id}", null, onSuccess);
 }
예제 #8
0
 public void FinishPlayerExpedition(PlayerExpedition playerExpedition, Action <PlayerActionResponse> onSuccess = null)
 {
     serverAPI.DoPost($"/expedition/{playerExpedition.id}/finish", null, onSuccess);
 }
예제 #9
0
 public void Breakdown(List <long> gearIds, Action <PlayerActionResponse> onSuccess = null)
 {
     serverAPI.DoPost("/forge/breakdown", new Breakdown {
         gearIds = gearIds, silent = true
     }, onSuccess);
 }