Add UI to Show Held & Craving
This commit is contained in:
		
							parent
							
								
									607a070ca3
								
							
						
					
					
						commit
						c24681e781
					
				
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Items/BPI_Bagutte.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Items/BPI_Bagutte.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Items/BPI_Bagutte_NP.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Items/BPI_Bagutte_NP.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Items/BPI_Bagutte_T.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Items/BPI_Bagutte_T.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Items/BPI_Bread.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Items/BPI_Bread.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Items/BPI_Bread_NP.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Items/BPI_Bread_NP.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Items/BPI_Bread_T.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Items/BPI_Bread_T.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Mart.umap
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Mart.umap
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Broom.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Broom.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Car.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Car.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/M_Car.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/M_Car.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/M_MopBucket.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/M_MopBucket.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/M_MopRed.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/M_MopRed.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/M_MopWhite.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/M_MopWhite.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/M_StickBrown.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/M_StickBrown.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/M_WetFloor.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/M_WetFloor.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Mop.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Mop.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/MopBucket.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/MopBucket.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Texture/M_Car.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Texture/M_Car.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Texture/M_MopBucket.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Texture/M_MopBucket.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Texture/M_MopRed.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Texture/M_MopRed.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Texture/M_MopWhite.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Texture/M_MopWhite.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Texture/M_StickBrown.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Texture/M_StickBrown.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Texture/M_WetFloor.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Texture/M_WetFloor.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Texture/WetFloor_M_WetFloor_BaseColor.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Texture/WetFloor_M_WetFloor_BaseColor.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Texture/WetFloor_M_WetFloor_OcclusionRoughnessMetallic.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/Texture/WetFloor_M_WetFloor_OcclusionRoughnessMetallic.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/WetFloor.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/WetFloor.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/WetFloor_M_WetFloor_BaseColor.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/WetFloor_M_WetFloor_BaseColor.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/WetFloor_M_WetFloor_OcclusionRoughnessMetallic.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/Ossie_Props/WetFloor_M_WetFloor_OcclusionRoughnessMetallic.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SeagullGame/Content/UI/BP_HUD.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SeagullGame/Content/UI/BP_HUD.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							@ -155,6 +155,17 @@ void ASeagullGameCharacter::StartGame()
 | 
				
			|||||||
		UStaticMeshComponent* MeshComponent = Cast<UStaticMeshComponent>(John->GetComponentByClass(UStaticMeshComponent::StaticClass()));
 | 
							UStaticMeshComponent* MeshComponent = Cast<UStaticMeshComponent>(John->GetComponentByClass(UStaticMeshComponent::StaticClass()));
 | 
				
			||||||
		if (!MeshComponent->HasAnySockets()) return;
 | 
							if (!MeshComponent->HasAnySockets()) return;
 | 
				
			||||||
		CravingItemActor->AttachToComponent(MeshComponent, FAttachmentTransformRules::SnapToTargetNotIncludingScale, "CravingSocket");
 | 
							CravingItemActor->AttachToComponent(MeshComponent, FAttachmentTransformRules::SnapToTargetNotIncludingScale, "CravingSocket");
 | 
				
			||||||
 | 
							FString CravingString = UEnum::GetValueAsString(CurrentCraving);
 | 
				
			||||||
 | 
							CravingString.Split(FString("::"), nullptr, &CravingString);
 | 
				
			||||||
 | 
							for (int i = 0; i < CravingString.Len(); i++)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								if (CravingString[i] >= 'A' && CravingString[i] <= 'Z')
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									CravingString.InsertAt(i, " ");
 | 
				
			||||||
 | 
									i++;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							CravingItemName = CravingString;
 | 
				
			||||||
	}, 60, true, 2);
 | 
						}, 60, true, 2);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -208,6 +219,17 @@ void ASeagullGameCharacter::PickupItem()
 | 
				
			|||||||
	CurrentItem->AttachToComponent(MeshComponent, FAttachmentTransformRules::SnapToTargetNotIncludingScale, "ItemSocket");
 | 
						CurrentItem->AttachToComponent(MeshComponent, FAttachmentTransformRules::SnapToTargetNotIncludingScale, "ItemSocket");
 | 
				
			||||||
	CurrentItem->SetActorEnableCollision(false);
 | 
						CurrentItem->SetActorEnableCollision(false);
 | 
				
			||||||
	ClosestItemActor->Destroy();
 | 
						ClosestItemActor->Destroy();
 | 
				
			||||||
 | 
						FString HeldItemString = UEnum::GetValueAsString(Cast<AItemActor>(CurrentItem)->ItemType);
 | 
				
			||||||
 | 
						HeldItemString.Split(FString("::"), nullptr, &HeldItemString);
 | 
				
			||||||
 | 
						for (int i = 0; i < HeldItemString.Len(); i++)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							if (HeldItemString[i] >= 'A' && HeldItemString[i] <= 'Z')
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								HeldItemString.InsertAt(i, " ");
 | 
				
			||||||
 | 
								i++;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						HeldItemName = HeldItemString;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void ASeagullGameCharacter::DropItem()
 | 
					void ASeagullGameCharacter::DropItem()
 | 
				
			||||||
@ -221,6 +243,7 @@ void ASeagullGameCharacter::DropItem()
 | 
				
			|||||||
	GetWorld()->SpawnActor(Cast<AItemActor>(CurrentItem)->ItemNoPhysics, &DropLocation);
 | 
						GetWorld()->SpawnActor(Cast<AItemActor>(CurrentItem)->ItemNoPhysics, &DropLocation);
 | 
				
			||||||
	CurrentItem->Destroy();
 | 
						CurrentItem->Destroy();
 | 
				
			||||||
	CurrentItem = nullptr;
 | 
						CurrentItem = nullptr;
 | 
				
			||||||
 | 
						HeldItemName = "";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void ASeagullGameCharacter::OnPickupBoxBeginOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
 | 
					void ASeagullGameCharacter::OnPickupBoxBeginOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
 | 
				
			||||||
 | 
				
			|||||||
@ -122,6 +122,10 @@ public:
 | 
				
			|||||||
	TArray<TSubclassOf<AItemActor>> ItemActors;
 | 
						TArray<TSubclassOf<AItemActor>> ItemActors;
 | 
				
			||||||
	UPROPERTY(BlueprintReadOnly, Category = "Item")
 | 
						UPROPERTY(BlueprintReadOnly, Category = "Item")
 | 
				
			||||||
	AActor* CravingItemActor;
 | 
						AActor* CravingItemActor;
 | 
				
			||||||
 | 
						UPROPERTY(BlueprintReadOnly, Category = "Item")
 | 
				
			||||||
 | 
						FString CravingItemName;
 | 
				
			||||||
 | 
						UPROPERTY(BlueprintReadOnly, Category = "Item")
 | 
				
			||||||
 | 
						FString HeldItemName;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	UPROPERTY(BlueprintReadOnly, Category = "John")
 | 
						UPROPERTY(BlueprintReadOnly, Category = "John")
 | 
				
			||||||
	AActor* John;
 | 
						AActor* John;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user