コード例 #1
0
    public void SetWeaponType(Slider id)
    {
        try
        {
            PC.WEAPON_TYPE weapon = (PC.WEAPON_TYPE)System.Convert.ToInt32(id.value); //(PC.WEAPON_TYPE)Enum.Parse(typeof(PC.WEAPON_TYPE), id.name, true);

            this.PC_CC.selectedWeapon = weapon;
            Debug.Log(string.Format("Weapon selected: {0}", weapon.ToString()));
        }
        catch
        {
            this.PC_CC.selectedWeapon = PC.WEAPON_TYPE.none;
        }

        switch (System.Convert.ToInt32(id.value))
        {
        case 0:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 1:
        {
            this.AXE_01LOD0.SetActive(true);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 2:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(true);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 3:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(true);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 4:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(true);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 5:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(true);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 6:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(true);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 7:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(true);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 8:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(true);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 9:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(true);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 10:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(true);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 11:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(true);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 12:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(true);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 13:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(true);
            break;
        }
        }
    }
コード例 #2
0
    public void SetWeaponType(PC.WEAPON_TYPE id)
    {
        switch (System.Convert.ToInt32(id))
        {
        case 0:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 1:
        {
            this.AXE_01LOD0.SetActive(true);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 2:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(true);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 3:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(true);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 4:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(true);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 5:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(true);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 6:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(true);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 7:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(true);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 8:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(true);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 9:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(true);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 10:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(true);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 11:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(true);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 12:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(true);
            this.SWORD_SHORT_LOD0.SetActive(false);
            break;
        }

        case 13:
        {
            this.AXE_01LOD0.SetActive(false);
            this.AXE_02LOD0.SetActive(false);
            this.CLUB_01LOD0.SetActive(false);
            this.CLUB_02LOD0.SetActive(false);
            this.FALCHION_LOD0.SetActive(false);
            this.GLADIUS_LOD0.SetActive(false);
            this.MACE_LOD0.SetActive(false);
            this.MAUL_LOD0.SetActive(false);
            this.SCIMITAR_LOD0.SetActive(false);
            this.SPEAR_LOD0.SetActive(false);
            this.SWORD_BASTARD_LOD0.SetActive(false);
            this.SWORD_BOARD_01LOD0.SetActive(false);
            this.SWORD_SHORT_LOD0.SetActive(true);
            break;
        }
        }
    }