Exemple #1
0
    public static void TrackingCall_LevelStart(RegionConfigDataBase region, SquadManager squad, PlayerLevel level)
    {
        Dictionary <string, object> call = new Dictionary <string, object>();

        call["player_level"] = level.GetCurrentLevel();

        call["int"]     = squad.selected_units;
        call["cleared"] = region.IsCompleteInSave().ToString();

        call["editor"] = Application.isEditor.ToString();


        Analytics.CustomEvent("mission_start_" + region.name, call);
    }
Exemple #2
0
    public MissionOutcome(SquadManager manager, PlayerLevel level, PlayerInventory inventory, GameManager game_manager) :
        this(manager.killed.Count, manager.evacuated.Count, inventory.GetItem(ItemTypes.dust).GetCount(), manager.selected_units.Count, game_manager.ChoosenRegionConfig.Difficulty, level.GetProgressInLevel(), level.GetCurrentLevel(), level.GetCurrentLevel())
    {
        PlayerInventory.Instance.ModifyItem(ItemTypes.saved_dust, LastOutcome.SuppliesGainedFinal);
        PlayerInventory.Instance.GetItem(ItemTypes.saved_dust).SaveValue();
        level.AddProgress(LastOutcome.SuppliesGainedFinal);
        PlayerInventory.Instance.ModifyItem(ItemTypes.dust, -PlayerInventory.Instance.GetItem(ItemTypes.dust).GetCount());

        if (manager.evacuated.Count > 0)
        {
            game_manager.ChoosenRegionConfig.CompleteInSave();
        }

        OnMissionOutcomeSet.AttemptCall(this);
    }