Resolve Money duplication between ANakedDesireCharacter and UGlobalSaveGameData
This commit is contained in:
@@ -154,6 +154,11 @@ void ANakedDesireCharacter::BeginPlay()
|
||||
|
||||
UGlobalSaveGameData* SaveGameData = UGlobalSaveGameData::LoadOrCreateSaveGame(DefaultPlayerClothing, DefaultWardrobeClothing);
|
||||
|
||||
if (SaveGameData)
|
||||
{
|
||||
Money = FMath::RoundToInt(SaveGameData->Money);
|
||||
}
|
||||
|
||||
SetupClothingSlots();
|
||||
|
||||
ClothingManager->OnClothingEquip.AddUniqueDynamic(this, &ANakedDesireCharacter::OnClothingEquip);
|
||||
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
float RunSpeed = 500.0f;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
int Money = 300000;
|
||||
int Money = 0;
|
||||
|
||||
int XP = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user