![]() ![]() Photon lets you set usernames for people in rooms - this is how others would know what your name is. Since you have the username in the garage, you can pass it to the lobby and then to the battle scene within your client-side code. } How to get player username into the battle scene? start the garage loading all over again FindObjectsOfType(). ![]() Log( "This username is already taken, choose a different one. ![]() link this from the inspector public async void OkButtonClicked()ĭebug. link via the inspector public InputField usernameField Public class UsernamePrompt : MonoBehaviour The server will handle the request in a UsernameFacet. When they hit ok, it will send the username to the server. This UsernamePrompt will display a box to the player letting them input their username. the username prompt screen will have a dedicated script that // controls it, say `Assets/Scripts/UsernamePrompt.cs` FindObjectsOfType(). Log( "The logged-in user is: " + response. check for null username if ( response. Public class GarageController : MonoBehaviour Let's create a class that will hold all this data we want to pull from the server at once: When the garage scene is loaded, the player is logged in and we need to download all sorts of data about the player. BattleScene the battle itself (not needed for this gist)įirst drop into your game the Email authentication template, set up login scene, create Assets/Backend/PlayerEntity.cs, after login load the GarageScene.LobbyScene perform matchmaking (not needed for this gist).GarageScene view player's in-game content.Your scripts folder is Assets/Scripts and it contains all your MonoBehaviour files that live on the client. Here are all the entities, facets and classes used by both the server and the client. I'll assume you have Unsiave imported into your project and set up to talk with the cloud.Īlso your backend folder is Assets/Backend. Gameplay from Tanki X Quickly about folder structure The game also reduces each player's RP by a certain amount, depending on where they are at.Structure of a Tanki X replica in Unisave At that time, the game will award players with crystals, x crystals, and league containers for the league they ended the season in. Every 2 months, the league system enters a new season. Upon entering a league for the first time, the game will grant players with the paint and 5 containers for the corresponding league. From lowest to highest, there are 5 leagues: Training, Bronze, Silver, Gold, and Masters. These points place players within a certain league, depending on how much RP they have. The ranked battle system is a ranking ladder which organizes players using RP (reputation points), which are rewarded or lost at the end of a completed battle. X crystals can also be earned by completing missions and entering certain promo codes. X Crystals are a premium currency, which is bought with real-world money and unlocks special skins, graffiti, special shell colors for turret ammo, paints for tanks and containers for module blueprints. Players gain new ranks at particular XP milestones which publicly represent their level of skill, dedication, and time playing the game. The amount of XP players gain has its own set of rewards. ![]() The number of experience gained is based on various factors including the number of opponents destroyed, killstreak and the amount of XP earned throughout the match. In-game currency and ranking system įor every tank destroyed or flag captured, players build up a number of XP (rank experience points) which they are rewarded, and container points. Capture the Flag on Tanki X map "Area 159". ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |