示例#1
0
        public void ClickAccessoryHandler()
        {
            if (!FunctionOpen.Model.FunctionOpenProxy.instance.IsFunctionOpen(FunctionOpenType.MainView_Equipment, true))
            {
                return;
            }
            RoleEquipmentsView roleEquipmentsView = UIMgr.instance.Open <RoleEquipmentsView>(RoleEquipmentsView.PREFAB_PATH);

            roleEquipmentsView.SetPlayerInfo(GameProxy.instance.PlayerInfo);
            roleEquipmentsView.SetCurrentSelectEquipmentType(EquipmentType.Accessory);
        }
示例#2
0
        public void ClickWeaponHandler()
        {
            if (!FunctionOpen.Model.FunctionOpenProxy.instance.IsFunctionOpen(FunctionOpenType.MainView_Equipment, true))
            {
                return;
            }
            RoleEquipmentsView roleEquipmentsView = UIMgr.instance.Open <RoleEquipmentsView>(RoleEquipmentsView.PREFAB_PATH);

            roleEquipmentsView.SetPlayerInfo(GameProxy.instance.PlayerInfo);
            RoleAttackAttributeType roleAttackAttributeType = CharacterUtil.GetRoleAttackAttributeType(GameProxy.instance.PlayerInfo.heroData.roleType);

            if (roleAttackAttributeType == RoleAttackAttributeType.PhysicalAttack)
            {
                roleEquipmentsView.SetCurrentSelectEquipmentType(EquipmentType.PhysicalWeapon);
            }
            else if (roleAttackAttributeType == RoleAttackAttributeType.MagicalAttack)
            {
                roleEquipmentsView.SetCurrentSelectEquipmentType(EquipmentType.MagicalWeapon);
            }
        }