UE5学习笔记21-武器的射击功能

一、创建C++类

        创建武器子弹的类,创建生产武器子弹的类,创建弹壳的类,生产武器子弹的类的父类是武器的类

        创建后如图,ProjectileMyWeapon类(产生子弹的类)继承自weapon类,Projectile(子弹的类),Casing(弹壳声音的类)

         在子弹的类中添加如下代码

//头文件中添加
private:
	UPROPERTY(EditAnywhere)
	class UBoxComponent* CollisionBox;// 碰撞盒的类

//构造中添加
CollisionBox = CreateDefaultSubobject<UBoxComponent>(TEXT("CollisionBox"));
SetRootComponent(CollisionBox);
CollisionBox->SetCollisionObjectType(ECollisionChannel::ECC_WorldStatic); //设置自身的碰撞类型
CollisionBox->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics); //启动碰撞,启动触发器
CollisionBox->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Ignore); //设置对其他类型的碰撞
/* 第一个参数对角色 第二个参数是对角色是哪种碰撞 */
CollisionBox->SetCollisionResponseToChannel(ECollisionChannel::ECC_Visibility, ECollisionResponse::ECR_Block);
CollisionBox->SetCollisionResponseToChannel(ECollisionChannel::ECC_WorldStatic, ECollisionResponse::ECR_Block);

 二、武器蒙太奇(开火动画),添加开火功能

        1.将动画设置为加性的(让动作连贯),将瞄准和不瞄准的动画找到设置如图

        2.创建武器蒙太奇动画,在对应动画右键->创建->创建动画蒙太奇 (我将创建好的蒙太奇动画放到了其他文件夹中)

        3.新建蒙太奇片段,添加插槽,将瞄准的动画拖拽到蒙太奇中

 将之前的default片段名删除

 

添加另一端动画

将之前默认跳转的动画清空变成单独的动画 

 

选择插槽

最后样子

 三、绑定开火按键

        1.编辑->项目设置->输入->操作映射->添加fire鼠标左键

        2.在角色类中添加绑定

//角色类头文件
/* 发射子弹函数 */
void FireButtonPressed();
void FireButtonRelease();
/* 发射子弹函数 */

//角色类源文件
void ABlasterCharacter::FireButtonPressed()
{
	if (Combat)
	{
		Combat->FireButtonPressed(true);
	}
}

void ABlasterCharacter::FireButtonRelease()
{
	if (Combat)
	{
		Combat->FireButtonPressed(false);
	}
}

//函数SetupPlayerInputComponent中
PlayerInputComponent->BindAction("Fire", IE_Pressed, this, &ABlasterCharacter::FireButtonPressed);
PlayerInputComponent->BindAction("Fire", IE_Released, this, &ABlasterCharacter::FireButtonRelease);

         3.声明一个蒙太奇动画类指针

//角色头文件	
// 当前类指针在界面中赋值 EditAnywhere可编辑 Combat在细节中找到对应设置
UPROPERTY(EditAnywhere , Category = Combat)
class UAnimMontage* FireWeaponMontage; // 动画蒙太奇类

        4.编译后在角色蓝图中设置对应的蒙太奇动画

        5.定义播放动画的函数,FName中的名字是蒙太奇动画中的名字

//角色类头文件
void PlayFireMontage(bool bAiming);

//角色类源文件
void ABlasterCharacter::PlayFireMontage(bool bAiming)
{
	if (Combat == nullptr || Combat->EquippedWeapon == nullptr) return;

	UAnimInstance* AnimInstance = GetMesh()->GetAnimInstance();
	if (AnimInstance && FireWeaponMontage)
	{
		AnimInstance->Montage_Play(FireWeaponMontage);
		/* 找到播放哪段动画 名字是动画中新建蒙太奇片段的名字 */
		FName SectionName;
		SectionName = bAiming ? FName("RifleAim") : FName("RifleHip");
		/* 找到播放哪段动画 */
		AnimInstance->Montage_JumpToSection(SectionName);
	}
}

         6.动画蓝图中的改变,武器开火实在装备武器后才可以所以如图,动画蓝图类中添加

slot中右侧细节可以选择槽

 new一个姿势

         7.在aimoffset中使用6中的姿势(在动作偏移中使用对应姿势)

        8. 在战斗组件类中添加代码(class ABlasterCharacter* Character指针我在角色类中的PostInitializeComponents函数赋值),使用了RPC函数多播功能让动画在每个客户端都能看见

void ABlasterCharacter::PostInitializeComponents()
{
	Super::PostInitializeComponents();
	if (Combat)
	{
		Combat->Character = this;
	}
}
FVector_NetQuantize是FVector的网络传输的序列化的结构,减少网络带宽
//战斗组件类头文件
// 开火函数 
void FireButtonPressed(bool bPressed);

/* Server RPC函数 */
UFUNCTION(Server, Reliable)
void ServerFire(const FVector_NetQuantize& TraceHitTarget);
/* Server RPC函数 */

/* 多播函数 */
UFUNCTION(NetMulticast , Reliable)
void MulticastFire(const FVector_NetQuantize& TraceHitTarget);
/* 多播函数 */

/* 命中线 */
void TraceUnderCrosshairs(FHitResult& TraceHitResult);
/* 命中线 */

class ABlasterCharacter* Character;
bool bFireButtonPressed;

//战斗组件类源文件
void UCombatComponent::FireButtonPressed(bool bPressed)
{
	bFireButtonPressed = bPressed;

	if (bFireButtonPressed)
	{
		FHitResult HitResult;
		TraceUnderCrosshairs(HitResult);
		ServerFire(HitResult.ImpactPoint);
	}
}

void UCombatComponent::TraceUnderCrosshairs(FHitResult& TraceHitResult)
{
	/* 屏幕中心为瞄准点 */
	/* 获得视口大小 */
	FVector2D ViewportSize;
	if (GEngine && GEngine->GameViewport)
	{
		GEngine->GameViewport->GetViewportSize(ViewportSize);
	}

	/* 获得屏幕中心坐标 */
	FVector2D CrosshaurLocation(ViewportSize.X / 2.f, ViewportSize.Y / 2.f);

	FVector CrosshairWorldPosition; //世界空间中的相应 3D 位置
	FVector CrosshairWorldDirection; //在给定的 2d 点处远离摄像机的世界空间方向矢量
	bool bScreenToWorld = UGameplayStatics::DeprojectScreenToWorld(
		UGameplayStatics::GetPlayerController(this, 0),
		CrosshaurLocation,
		CrosshairWorldPosition,
		CrosshairWorldDirection
	);

	if (bScreenToWorld)
	{
		FVector Start = CrosshairWorldPosition;
        TRACE_LENGTH 我设置为8000 在世界坐标的长度可以理解成武器的射程
		FVector End = Start + CrosshairWorldDirection * TRACE_LENGTH;

		/*
		* bool LineTraceSingleByChannel(
			FHitResult& OutHit,             // 输出的碰撞信息
			const FVector& Start,           // 射线的起点
			const FVector& End,             // 射线的终点
			ECollisionChannel TraceChannel, // 碰撞通道
			const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, // 可选的额外查询参数
			const FCollisionResponseParams& ResponseParam = FCollisionResponseParams::DefaultResponseParam // 可选的碰撞响应参数
			);
		*/
		//检查射线与场景中的物体是否有交点,并返回相关的碰撞信息
		GetWorld()->LineTraceSingleByChannel(
			TraceHitResult,
			Start,
			End,
			ECollisionChannel::ECC_Visibility
		);
#if 0
		if (!TraceHitResult.bBlockingHit)
		{
			TraceHitResult.ImpactPoint = End;
			HitTarget = End;
		}
		else
		{
			HitTarget = TraceHitResult.ImpactPoint;
			/*DrawDebugSphere(
				const UWorld* World,     // 表示你要在哪个世界中绘制球体
				FVector Center,          // 球体的中心位置
				float Radius,            // 球体的半径
				int32 Segments,          // 球体的分段数,影响球体的平滑度
				FColor Color,            // 球体的颜色
				bool bPersistentLines,    // 是否为持久化的调试线条(场景切换后是否还存在)
				float LifeTime,          // 调试球体的生存时间,0 为永久存在
				uint8 DepthPriority,     // 渲染优先级(影响是否被遮挡)
				float Thickness          // 球体线条的厚度
			)*/
			DrawDebugSphere(
				GetWorld(),
				TraceHitResult.ImpactPoint,
				12.f, //半径
				12, //
				FColor::Red
			);
		} 
#endif
	}
}

void UCombatComponent::ServerFire_Implementation(const FVector_NetQuantize& TraceHitTarget)
{
	MulticastFire(TraceHitTarget);
}

void UCombatComponent::MulticastFire_Implementation(const FVector_NetQuantize& TraceHitTarget)
{
	if (EquippedWeapon == nullptr) return;
	if (Character)
	{
		//UE_LOG(LogTemp, Warning, TEXT("FireButtonPressed"));
		Character->PlayFireMontage(bAiming);
		EquippedWeapon->Fire(TraceHitTarget);
	}
}

         9.武器类添加代码

//武器类头文件
/* 开火功能 */
virtual void Fire(const FVector& HitTaget);

UPROPERTY(EditAnywhere , Category = "Weapon Properties")
class UAnimationAsset* FireAnimation; //动画资产类
 
UPROPERTY(EditAnywhere)
TSubclassOf<class ACasing> CasingClass; // 监视类 -- 监视蛋壳弹出

//武器类源文件
void AWeapon::Fire(const FVector& HitTaget)
{
	if (FireAnimation)
	{
		WeapomMesh->PlayAnimation(FireAnimation, false);
	}
	if (CasingClass)
	{
		const USkeletalMeshSocket* AmmoEjectSocket = WeapomMesh->GetSocketByName(FName("AmmoEject"));
		if (AmmoEjectSocket)
		{
			FTransform SocketTransform = AmmoEjectSocket->GetSocketTransform(GetWeaponMesh());

			UWorld* World = GetWorld();
			if (World)
			{
				World->SpawnActor<ACasing>(
					CasingClass,
					SocketTransform.GetLocation(),
					SocketTransform.GetRotation().Rotator()
				);
			}
		}
	}
}

        10.创建子弹蓝图类

        11.设置蓝图

        1.打开蓝图设置对用的武器网格体,WeaponMesh细节中网格体的骨骼网格体资产选择对于你武器资产

         2.设置pickwidget(没有可以不用设置)细节中用户界面的空间选择屏幕空间类选择对饮蓝图类

        3.设置动画(武器开火动画)该蓝图的类是projectileweapon,它的父类是weapon,父类中有

    UPROPERTY(EditAnywhere , Category = "Weapon Properties")
    class UAnimationAsset* FireAnimation; //动画资产类

        所以一在细节中可以找到(C++类的继承)

        4.将11中的创建武器蓝图拖拽到地图中

        12. 摄像机的偏移(可选,若想看见角色前方的可以设置)

         13.生产子弹类中代码(GetSocketName中的名字是对应武器网格体中枪口的插槽的名字)

//子弹类头文件
public:
	virtual void Fire(const FVector& HitTaget) override;

protected:
	UPROPERTY(EditAnywhere)
	TSubclassOf<class AProjectile> ProjectileClass;

//子弹类源文件
void AProjectileMyWeapon::Fire(const FVector& HitTaget)
{
	Super::Fire(HitTaget);

	if (!HasAuthority()) return;
	APawn* InstigatorPawn = Cast<APawn>(GetOwner());
	const USkeletalMeshSocket* MuzzleFlashSocket = GetWeaponMesh()->GetSocketByName(FName("MuzzleFlash"));
	if (MuzzleFlashSocket)
	{
		FTransform SocketTransform = MuzzleFlashSocket->GetSocketTransform(GetWeaponMesh());
		// 从枪口闪光插座到开火位置 获得尖端的位置
		FVector ToTarget = HitTaget - SocketTransform.GetLocation();
		FRotator TargetRotation = ToTarget.Rotation();
		if (ProjectileClass && InstigatorPawn)
		{
			FActorSpawnParameters SpawnParams;
			SpawnParams.Owner = GetOwner();
			SpawnParams.Instigator = InstigatorPawn;
			UWorld* World = GetWorld();
			if (World)
			{
				World->SpawnActor<AProjectile>(
					ProjectileClass,
					SocketTransform.GetLocation(),
					TargetRotation,
					SpawnParams
					);
			}
		}
	}
}

        14.创建子弹类蓝图

        15.打开子弹类蓝图设置(中间黄色的是碰撞盒)

        15.1 设置碰撞盒大小

         16.定义粒子特效类和声音类

//子弹类头文件
	virtual void Destroyed() override;

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

	UFUNCTION()
	virtual void OnHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);

public:	

private:
	UPROPERTY(VisibleAnywhere)
	class UProjectileMovementComponent* ProjectileMovementComponent; //子弹运动的类

	UPROPERTY(EditAnywhere)
	class UParticleSystem* Tracer; //粒子系统类

	class UParticleSystemComponent* TracerComponent;	//粒子系统组件类

	UPROPERTY(EditAnywhere)
	class UParticleSystem* ImpactParticals; //粒子系统类

	UPROPERTY(EditAnywhere)
	class USoundCue* ImpactSound;//声音提示类

//子弹类源文件
//构造中添加
ProjectileMovementComponent = CreateDefaultSubobject<UProjectileMovementComponent>(TEXT("ProjectileMovementComponent"));
ProjectileMovementComponent->bRotationFollowsVelocity = true; //如果为 true,则此射弹将在每一帧更新其旋转以匹配其速度方向
// Called when the game starts or when spawned
void AProjectile::BeginPlay()
{
	Super::BeginPlay();
	
	if (Tracer)
	{
		//播放附加到指定组件并跟随指定组件的指定效果。当效果完成时,系统将消失。不复制
		TracerComponent = UGameplayStatics::SpawnEmitterAttached(
			Tracer,//粒子系统创建
			CollisionBox,//要附加到的组件。
			FName(),//AttachComponent 中的可选命名点,用于生成发射器
			GetActorLocation(),// 位置 -- 根据 LocationType 的值,这是与附加组件/点的相对偏移量,或者是将转换为相对偏移量的绝对世界位置(如果 LocationType 为 KeepWorldPosition)。
			GetActorRotation(),//旋转 -- 根据 LocationType 的值,这是与附加组件/点的相对偏移量,或者是将转换为相对偏移量的绝对世界旋转(如果 LocationType 为 KeepWorldPosition)
			EAttachLocation::KeepWorldPosition//根据 LocationType 的值,这是附加组件中的相对缩放,或者是将转换为相对缩放的绝对世界缩放(如果 LocationType 为 KeepWorldPosition)。
			//指定 Location 是相对偏移还是绝对世界位置
			//当粒子系统完成播放时,组件是否会自动销毁,或者是否可以重新激活
			//用于池化此组件的方法。默认为 none。
			//组件是否在创建时自动激活。	
		);
	}
	if (HasAuthority())
	{
		CollisionBox->OnComponentHit.AddDynamic(this,&AProjectile::OnHit);
	}
}

void AProjectile::OnHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit)
{
	Destroy();
}

void AProjectile::Destroyed()
{
	Super::Destroyed();

	if (ImpactParticals)
	{
		UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), ImpactParticals, GetActorTransform());
	}
	if (ImpactSound)
	{
		UGameplayStatics::PlaySoundAtLocation(this, ImpactSound, GetActorLocation());
	}
}

        17.设置声音和粒子特效设置速度

        18. 若想发射子弹时在其他客户端也可以显示在子弹类的构造中将bReplicates = true;即可

        19.弹壳类

//弹壳头文件
	UFUNCTION()
	virtual void OnHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);

#if 0
public:	
	// Called every frame
	virtual void Tick(float DeltaTime) override;
#endif

private:
	UPROPERTY(VisibleAnywhere)
	UStaticMeshComponent* CasingMesh;//静态网格体类 武器开火时弹出的子弹的网格体

	UPROPERTY(EditAnywhere)
	float ShellEjectionImpulse;// 弹壳初速度

	UPROPERTY(EditAnywhere)
	class USoundCue* ShellSound;// 弹壳弹出时的声音

//弹壳源文件
ACasing::ACasing()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = false;

	CasingMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("CasingMesh"));
	SetRootComponent(CasingMesh);
	CasingMesh->SetCollisionResponseToChannel(ECollisionChannel::ECC_Camera,ECollisionResponse::ECR_Ignore);
	CasingMesh->SetSimulatePhysics(true); // 物理
	CasingMesh->SetEnableGravity(true); // 重力
	CasingMesh->SetNotifyRigidBodyCollision(true); //通知
	ShellEjectionImpulse = 10.f;
}

// Called when the game starts or when spawned
void ACasing::BeginPlay()
{
	Super::BeginPlay();
	
	CasingMesh->OnComponentHit.AddDynamic(this, &ACasing::OnHit);
	// 给弹壳添加初始速度
	CasingMesh->AddImpulse(GetActorForwardVector() * ShellEjectionImpulse);
}
void ACasing::OnHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit)
{
	if (ShellSound)
	{
		UGameplayStatics::PlaySoundAtLocation(this, ShellSound, GetActorLocation());
	}

	Destroy();
}
#if 0
// Called every frame
void ACasing::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);

}
#endif

        20.弹壳类蓝图

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/875554.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

如何使用QT完成记事本程序的UI界面布局

每日QT技巧查询表-CSDN博客 会持续更新记事本编写的全部过程&#xff0c;关注不迷路 一、相关控件 ①水平和垂直布局 ②按键 ③文本框 ④水平弹簧 ⑤标签 ⑥Widget 二、控件使用方法 1、PushButton 拖出三个按键&#xff0c;并对其进行命名&#xff0c;两处地方命名可以不一…

【Echarts】vue3打开echarts的正确方式

ECharts 是一个功能强大、灵活易用的数据可视化工具&#xff0c;适用于商业报表、数据分析、科研教育等多种场景。那么该如何优雅的使用Echarts呢? 这里以vue3为例。 安装echarts pnpm i echarts封装公用方法 // ts-nocheck import * as echarts from echarts; // 我们这里借…

C++:入门基础

一.C参考文档 https://legacy.cplusplus.com/reference/ https://zh.cppreference.com/w/cpp https://en.cppreference.com/w/ 二.C的第一个程序 #include <iostream> using namespace std;int main() {cout << "Hello world!" << en…

无人机PX4飞控ROS应用层开发:MAVROS 功能包介绍与飞控消息汇总(一)

概述 这个软件包提供了针对各种自动驾驶仪(如PX4,Ardupilot)使用 MAVLink 通信协议的通信驱动程序。 此外&#xff0c;它还提供了用于地面控制站&#xff08;例如 QGroundControl&#xff09;的 UDP MAVLink 桥接功能。 通常与PX4的offboard模式联合使用 Offboard控制背后的想…

单机docker-compose部署minio

单机多副本docker-compose部署minio 简单介绍 如果服务器有限可以单机挂载多硬盘实现多副本容错&#xff08;生产不推荐&#xff09; 部署好的文件状态 有两个重要文件 docker-compose.yaml和nginx.conf docker-compose.yaml是docker部署容器的配置信息包括4个minio和1个ng…

c中 int 和 unsigned int

c语言中&#xff0c;char、short、int、int64以及unsigned char、unsigned short、unsigned int、unsigned int64等等类型都可以表示整数。但是他们表示整数的位数不同&#xff0c;比如&#xff1a;char/unisigned char表示8位整数&#xff1b; short/unsigned short表示16位整…

菜鸟入门Docker

初始Docker Docker的概念 Docker的用途 DOcke的安装 Docker架构 配置Docker镜像加速器 Docker常用命令 Docker服务相关的命令。 Docker镜像相关的命令 Docker容器相关的命令 容器的数据卷 数据卷的概念和作用 配置数据卷 Docker应用部署 Docker部署mysql Docker…

Unity同时启动多个Editor

HardLinkShellExt tool https://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html 作用&#xff1a; 1.网络Online项目方便调试&#xff0c;MMO项目 2.方便发布不同平台的包&#xff0c;快速开发测试 使用方法&#xff1a;

easy-es动态索引支持

背景 很多项目目前都引入了es&#xff0c;由于es弥补了mysql存储及搜索查询的局限性&#xff0c;随着技术的不断迭代&#xff0c;原生的es客户端使用比较繁琐不直观&#xff0c;上手代价有点大&#xff0c;所以easy-es框架就面世了&#xff0c;学习成本很低&#xff0c;有空大…

【Gateway】Gateway Filter Factories

Predicate决定了请求由哪一个路由处理,如果在请求处理前后需要加一些逻辑,这就是Filter(过滤器)的作用范围了.Filter分为两种类型:Pre类型和Post类型 滤器的两种类型 Pre 类型过滤器: 执行时机: 在请求被转发到后端服务之前执行。作用: 可以用来执行鉴权、限流、请求日志记录、…

Django笔记一:搭建Django环境与URL路径访问

博主之前学从Java后端开发&#xff0c;后面获取到读研资格&#xff0c;想着未来转算法岗&#xff0c;初学Python&#xff0c;发现Python还挺有趣的&#xff0c;由于之前所学后端缘故&#xff0c;有点后端情节&#xff0c;想学习一下Django框架&#xff08;python的web框架&…

什么是交换机级联?

在现代计算机网络中&#xff0c;交换机级联是一种广泛应用的技术&#xff0c;有助于提升网络的扩展性和灵活性。本文将深入探讨交换机级联相关知识&#xff0c;详细介绍其基本概念和连接配置方法&#xff0c;并对常见技术问题进行解答。 交换机级联概述 交换机级联是指通过将…

线性基大发现

一.构造方法 1.贪心法&#xff08;每一个数往里插入即可&#xff09; /*贪心法构造线性基的特点&#xff1a; 1.从小到大排列 2.各个基的高位可能存在重复的1 2.线性基不是唯一的&#xff0c;与原集合的元素顺序有关*/ void insert(int x){//贪心法for(int i63;i>0;i--){i…

c#中给winform定义快捷键的几种方式

快捷键的使用在日常的开发中频率比较高&#xff0c;这里总结了最常见的各种快捷键的设置方式&#xff0c;需要的时候大家直接照抄就可以了&#xff0c;不用再去查询如何实现了。 文章目录 一、按钮快捷键二、菜单快捷键三、全局快捷键1、重写ProcessCmdKey2、使用KeyPreview属…

Word使用手册

修改样式 编辑word文档时&#xff0c;标题和正文文本通常有不同的格式&#xff0c;如果能将这些格式保存为样式&#xff0c;下一次就能直接调用样式&#xff0c;而不需要重复手动设置格式。 可以将样式通常保存为不同的 样式模板.docx&#xff0c;要调用不同样式集&#xff0…

MATLAB基础应用精讲-【数模应用】卡方拟合优度检验(附MATLAB、python和R语言代码实现)

目录 前言 几个高频面试题目 卡方分布与拟合优度的卡方检验是什么关系? 算法原理 什么是卡方检验 卡方是什么? 如何使用卡方表计算器? 什么是卡方拟合优度检验 使用条件 基本原理 数学模型 卡方检验自由度 理论频数计算 需要注意的事项 卡方检验分类 1、 独…

校园管理系统创新:Spring Boot框架应用案例

第4章 系统设计 4.1 系统体系结构 校园管理系统的结构图4-1所示&#xff1a; 图4-1 系统结构 登录系统结构图&#xff0c;如图4-2所示&#xff1a; 图4-2 登录结构图 校园管理系统结构图&#xff0c;如图4-3所示。 图4-3 校园管理系统结构图 4.2开发流程设计 系统流程的分…

走进低代码表单开发(一):可视化表单数据源设计

在前文&#xff0c;我们已对勤研低代码平台的报表功能做了详细介绍。接下来&#xff0c;让我们深入探究低代码开发中最为常用的表单设计功能。一个完整的应用是由众多表单组合而成的&#xff0c;所以高效的表单设计在开发过程中起着至关重要的作用。让我们一同了解勤研低代码开…

网络安全要点总结

1. 入侵检测与防御: 1)入侵检测与系统IDS(intrusion detection system):防火墙之后的第二道闸门; IDS的部署:采用镜像端口或者集线器方式;部署在:服务器交换机上,internet接入路由器后面的第一台交换机上; IRSintrusion response system入侵响应系统: 2).IPS(…

如何进行大模型训练和微调?(实战)

1、在项目中&#xff0c;如果prompt和function calling足够好&#xff0c;尽量不要微调&#xff0c;节约成本。 以下是针对function calling的slot&#xff0c;评估准确率&#xff08;识别准确度&#xff09;、召回率&#xff08;全面率&#xff09;&#xff0c;F1值。 从中可以…