コード例 #1
1
void ADonkeyKongCharacter::Climb(float Value)
{
	ClimbingDirection = Value;
	if (bIsClimbing)
	{
		FVector Move = ClimbDirection * Value;
		AddActorLocalOffset(Move);
		UnEquipWeapon();
	}
	
}
コード例 #2
0
void ADonkeyKongCharacter::EquipWeapon(class ADKWeapon* WeaponIn)
{
	if (EquipedWeapon)
	{
		UnEquipWeapon();
		EquipedWeapon = WeaponIn;
	}
	else
	{
		EquipedWeapon = WeaponIn;
	}
	EquipedWeapon->AttachRootComponentTo(WeaponAttachPoint, NAME_None, EAttachLocation::SnapToTarget);
	EquipedWeapon->ActivateWeapon(this);
}
コード例 #3
0
ファイル: FPSCharacter.cpp プロジェクト: Blito/glbpaintball
void AFPSCharacter::EquipWeapon(AFPSWeapon * Weapon)
{
	if (!Weapon)
		return;

	if (GEngine)
	{
		GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Blue, TEXT("Weapon equipped."));
	}

	UnEquipWeapon();
	ActiveWeapon = Weapon;
	ActiveWeapon->OnEquip(this);

}
コード例 #4
0
void UAREquipmentComponent::ServerUnEquipWeapon_Implementation(FName ItemID, int32 Hand)
{
	UnEquipWeapon(ItemID, Hand);
}