コード例 #1
0
 public PowerupAttachable GetMod(ModMount mount)
 {
     if (equippedMods.ContainsKey(mount))
     {
         return(equippedMods[mount]);
     }
     return(null);
 }
コード例 #2
0
 public void Remove(ModMount slot)
 {
     if (equippedMods.ContainsKey(slot))
     {
         equippedMods[slot].GetComponent <PowerupMain>().UnEquip();
         equippedMods.Remove(slot);
     }
     ReCalcStats();
 }
コード例 #3
0
    public void Unequipper(string name)
    {
        noItem = true;
        switch (name)
        {
        case "FrontWeapons":
            weaponMount = WeaponMount.Grill;
            isWeapon    = true;
            break;

        case "RearWeapons":
            weaponMount = WeaponMount.Hitch;
            isWeapon    = true;
            break;

        case "DoorWeapons":
            weaponMount = WeaponMount.Doors;
            isWeapon    = true;
            break;

        case "RoofWeapons":
            weaponMount = WeaponMount.Roof;
            isWeapon    = true;
            break;

        case "WheelWeapons":
            weaponMount = WeaponMount.Wheels;
            isWeapon    = true;
            break;

        case "EngineMods":
            modMount = ModMount.Engine;
            isWeapon = false;
            break;

        case "NitroMods":
            modMount = ModMount.Trunk;
            isWeapon = false;
            break;

        case "ChassisMods":
            modMount = ModMount.Frame;
            isWeapon = false;
            break;

        case "BumperMods":
            modMount = ModMount.Bumpers;
            isWeapon = false;
            break;

        case "WheelMods":
            modMount = ModMount.Tires;
            isWeapon = false;
            break;
        }
    }
コード例 #4
0
ファイル: GarageSlider.cs プロジェクト: zzf18676456441/caRPG
    public void ShowUnequippedItem(ModMount mount)
    {
        StatPack          pack      = new StatPack();
        PowerupAttachable otherItem = controller.GetCar().GetComponent <PowerupManager>().GetMod(mount);

        if (otherItem == null)
        {
            return;
        }
        StatPack otherPack = otherItem.GetComponent <PowerupStats>().GetPack();

        ShowStatBars(pack, otherPack);
    }
コード例 #5
0
 public static void TryUpdate(StatPack pack, ModMount mod)
 {
     if (ModMin.ContainsKey(mod))
     {
         ModMin[mod] = StatPack.Min(ModMin[mod], pack);
         ModMax[mod] = StatPack.Max(ModMax[mod], pack);
     }
     else
     {
         ModMin[mod] = StatPack.Min(new StatPack(), pack);
         ModMax[mod] = StatPack.Max(new StatPack(), pack);
     }
     UpdateMinMax();
 }