Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

STUDY THE CLASS DIAGRAM FIRST. GET FAMILIAR WITH THE CLASS RELATIONSHIPS, VARIABLES AND FUNCTIONS. Instructions : Player Must be able to pickup at least two

image text in transcribedimage text in transcribed
STUDY THE CLASS DIAGRAM FIRST. GET FAMILIAR WITH THE CLASS RELATIONSHIPS, VARIABLES AND FUNCTIONS. Instructions : Player Must be able to pickup at least two different weapons when the "E" key is pressed, and the picked up weapons are added to the inventory. Player Must be able to cycle through the weapons in the Inventory. "C" for the Next Weapon, "X"key for the Previous weapon. Player must be able to have NO Equiped weapon as well. Player Must be able to shoot both weapons. When the weapon is equiped using the Left Shift key. Each weapon must be shot with a different projectile speed and visual. Each weapon must make a fire sound when shot by the player. Each projectile must collide with the walls and must have a Impact sound and a particle effect spawn when it hits the wall. Player can pick up Ammo, which will add to the current weapons ammo count (Weapon that is currently equiped) . Co CHALLENGE Use Timers: The Weapons should shoot with a fire rate when the shift key is pressed (Pull Trigger) and stop shooting when the shift key is released (Release Trigger) Search for: In InventoryComponent Implement: Select Inventory ( . . .) NextInventoryItem () PreviousInventoryItem () EquipNewInventoryItem ( ) In Projectile Implement: SetFireDirection (. . .) OnHit (. . .) In Weapon Implement : AWeaponActor () Equip ( . . .) UnEquip () BeginPlay () Fire () SpawnProjectile () In MegaPlayerPawn Implement: NextWeapon ( ) PrevWeapon ( ) PickupWeapon ( ) FireWeapon () SetupPlayerInputComponent ( . . . ) OnOverlap ( . . . . )AMegaPlayerPawn UPROPERTY(Category = Character, VisibleAnywhere, meta = (AllowP * CapsuleComponent : UCapsuleComponent Pickup Sphere Component : USphere Component JinventoryComponent ArmComposanywhere. BlueprintReadOnly, Category = Spring Arm", meta = (AllowPrivateAccess = "true")) UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Inventory") # CurrentInventoryitem : APickupActors Has a UPROPERTY(Category = Character. VisibleAnywhere, BlueprintReadOnly, meta = (Allow Private Access = "true")) APickupActor # InventoryComponent : UInventoryComponent* Contains UPROPERTY(VisibleAnywhere Sphere Collision : USphereComponent- ReadOnly, Category = "Components") 0.." # CurrentWeapon : AWeaponActor UinventoryComponent() PROPERTY(EditAnywhere, BlueprintReadWrite, Category = Enum) PROPERTY(Visible Anywhere, BlueprintReadOnly, Category = "Custom") # Sprite : UPaperSpriteComponent* AddToinventory(pickup : APickupActor*) : void DirectionEnum : EDirectionEnum + APickupActor JPROPERTY(Visible Anywhere, BlueprintReadOnly, Category = "Config", meta = (AllowPrivateAccess = "true")) # Beg + GetinventoryCount() : int Follow Camera : UCameraComponent + Enable() : void + Nextinventoryitems : valegory ="Inventory") PROPERTY (EditAnywhere, Cate Anywhere, Category = "Pawn Visual") PlayerSprite : UPaperSprite Component Previousinventory lem( ) = void bJump : Doright : float JFUNCTION(BlueprintCallable, Category = "Inventory") GetCurrentInventory() : APickupActor* const + AMegaPlayerPawn + ResetCurrentinventory() : void Tick (DeltaTime : float) : void I override> BeginPlay() : void JFUNCTION(). NextWeapon() : void EquipNewinventoryItem(Newitem : APickupActor*) : void JFUNCTION() Selectinventory(dir : EinventoryDirection) : void # PrevWeapon() : void JFUNCTION() # PickupWeapon() : void UFUNCTION() FireWeapon() : void AWeapon * SetupPlayerinputComponent(PlayerinputComponent : UInputComponent*) : void UPROPERTY(EditDefaults Only) MoveRight(value : float) : void AAmmoPickup MoveUp() : void ERTY(EditDefaultsOnly, Category = AmmoCount) JPROPERTY(EditDefaultsOnly, BlueprintReadOnly) + AAmmoPickup() MaximumAmmo : int s a Current Equiped Weapon - OnOverlap(OverlappedComponent : UPrimitive Component, JPROPERTY(EditDefaults Only, BlueprintReadOnly) overcomp .UPrimitiv other Comp : UPrimitiveComponent*, AudioComponent : JAWhere, BlueprintReadOnly, Category = "Custom") SweepResult : const FHitResult&) : void - EquipFromInventory(dir : EinventoryDirection) : void PROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Custom") + FireSound : USoundBase* UPROPERTY(EditDefaultsOnly, Category = Projectile) + Projectile Class : TSubclassOf PERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Custom") + AWeaponActor() Equip(Character : AMegaPlayerPawn*) : void * UnEquip() : void JFUNCTION( + GetMuzzleLocation() : FVector cons # Tick(Delta Time : fl # SpawnProjectile() : voice float) : void and spawns a projectile when weapon is fired AProjectile UPROPERTY (Visible Anywhere, BlueprintReadOnly, Category = "Projectile Movement") * ProjectileMovementComponent : UProjectileMovementComponent JPROPERTY(EditDefaults Only, Category = "Effects") # ProjectileFX : UParticleSystem Impactsound : Usnywhere, BlueprintReadOnly, Category = "Effects") UPROPERTY(EditDefaults Only, BlueprintReadOnly) InitialSpeed : int = 50go Only, BlueprintReadOnly) UPROPERTY(Visible Anywhere, BlueprintReadOnly, Category = "Config", meta = (All - SceneComponent : USceneComponent = "true")) PROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Config", meta = (AllowPrivateAccess = "true")) SphereComponent : USphereComponent JPROPERTY(Visible Anywhere, BlueprintReadOnly, Category = "Config", meta = (AllowPrivateAccess = "true")) + AProjectile() + SetFireDirection(dir : FVector) : void # BeginPlay() : void FUNCTION() otherActor ? Am OtherComp : UPrimitiveComponent*, Hit : const FHitResult&) : void

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions