Exemplo n.º 1
0
    public Sprite GetLootBoxImage(LootBox.LootBoxType lootBoxType)
    {
        switch (lootBoxType)
        {
        case LootBox.LootBoxType.HEAVY:
            return(HeavySprite);

        case LootBox.LootBoxType.MEDIUM:
            return(MediumSprite);

        case LootBox.LootBoxType.LIGHT:
            return(LightSprite);

        default:
            return(LightSprite);
        }
    }
Exemplo n.º 2
0
    public int GetLootBoxHealth(LootBox.LootBoxType lootBoxType)
    {
        switch (lootBoxType)
        {
        case LootBox.LootBoxType.HEAVY:
            return(200);

        case LootBox.LootBoxType.MEDIUM:
            return(150);

        case LootBox.LootBoxType.LIGHT:
            return(100);

        default:
            return(100);
        }
    }
Exemplo n.º 3
0
 public LootBox GenerateLootBox()
 {
     LootBox.LootBoxType lootBoxTypeGenerated = (LootBox.LootBoxType)UnityEngine.Random.Range(0, Enum.GetNames(typeof(LootBox.LootBoxType)).Length);
     return(new LootBox(100, User.user.Level, User.user.Level / 10, 4, LootBox.LootType.FREE, lootBoxTypeGenerated, GetLootBoxImage(lootBoxTypeGenerated), GetLootBoxHealth(lootBoxTypeGenerated)));
 }