MissionCompleted
Introduction
Backend Name:
mission_complete
Description: The player completed a mission
Event Type:
Level
Priority:
P1
Parameters
Name | Type | Select | Backend name | Description |
---|---|---|---|---|
additionalData | Dictionary |
Optional | additional_data | Any additional information |
isTutorial | bool | Required | is_tutorial | Is it a tutorial? |
missionAttempt | int | Required | mission_attempt | Number of times user has played Game Level N (second play of Game Level N = 2) |
missionID | string | Required | mission_id | The unique ID for the mission. |
missionName | string | Optional | mission_name | |
missionType | string | Optional | mission_type | Indicate the type of the mission, level, task, quests etc. |
reward | Reward | Required | reward | If rewards are given to the player at the time of the event, the reward object is used to track the items (e.g., boosters, coins, gems, etc) or currencies gifted or earned by the player to the player. |
userScore | int | Required | user_score | The player’s score |
missionID | string | Optional | mission_id |
Code example
Product product = new Product();
List<VirtualCurrency> virtualCurrencies = new List<VirtualCurrency>
{ new VirtualCurrency("coins", "gold", 100) };
product.virtualCurrencies = virtualCurrencies;
Reward reward = new Reward(product);
LionAnalytics.MissionCompleted(
isTutorial: false,
missionType: "bossFight",
missionName: "fight_level_12",
missionID: "boss_fight_2",
userScore: 67,
missionAttempt: 4,
reward: reward);