void ADonkeyKongCharacter::Climb(float Value) { ClimbingDirection = Value; if (bIsClimbing) { FVector Move = ClimbDirection * Value; AddActorLocalOffset(Move); UnEquipWeapon(); } }
void ADonkeyKongCharacter::EquipWeapon(class ADKWeapon* WeaponIn) { if (EquipedWeapon) { UnEquipWeapon(); EquipedWeapon = WeaponIn; } else { EquipedWeapon = WeaponIn; } EquipedWeapon->AttachRootComponentTo(WeaponAttachPoint, NAME_None, EAttachLocation::SnapToTarget); EquipedWeapon->ActivateWeapon(this); }
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); }
void UAREquipmentComponent::ServerUnEquipWeapon_Implementation(FName ItemID, int32 Hand) { UnEquipWeapon(ItemID, Hand); }