Skip to content

Commit

Permalink
오브젝트 완료 후 탈출 시 무법자 승리
Browse files Browse the repository at this point in the history
타운 맵 완성(추후 수정할 수도)
  • Loading branch information
DY committed Feb 20, 2023
1 parent 84f4263 commit 066510a
Show file tree
Hide file tree
Showing 34 changed files with 13 additions and 1 deletion.
Binary file modified Content/Blueprints/Buildings/BP_Ammunition.uasset
Binary file not shown.
Binary file modified Content/Blueprints/Buildings/BP_Bank.uasset
Binary file not shown.
Binary file modified Content/Blueprints/Buildings/BP_BarberShop.uasset
Binary file not shown.
Binary file modified Content/Blueprints/Buildings/BP_Church.uasset
Binary file not shown.
Binary file added Content/Blueprints/Buildings/BP_Cop.uasset
Binary file not shown.
Binary file modified Content/Blueprints/Buildings/BP_GrandHotel.uasset
Binary file not shown.
Binary file modified Content/Blueprints/Buildings/BP_Saloon.uasset
Binary file not shown.
Binary file modified Content/Blueprints/Buildings/BP_Sheriff.uasset
Binary file not shown.
Binary file modified Content/Blueprints/Buildings/BP_Supply.uasset
Binary file not shown.
Binary file modified Content/Blueprints/Buildings/BP_TradingPost.uasset
Binary file not shown.
Binary file modified Content/Blueprints/Buildings/BP_TrainStation.uasset
Binary file not shown.
Binary file modified Content/Blueprints/Buildings/BP_Undertaker.uasset
Binary file not shown.
Binary file modified Content/Blueprints/Buildings/BP_Unnamed.uasset
Binary file not shown.
Binary file modified Content/Blueprints/Controller/BP_TownPlayerController.uasset
Binary file not shown.
Binary file added Content/Blueprints/Etc/BP_Exit.uasset
Binary file not shown.
Binary file modified Content/Blueprints/GameModes/BP_TownGameMode.uasset
Binary file not shown.
Binary file modified Content/Maps/GameStartupMap.umap
Binary file not shown.
Binary file modified Content/Maps/Town.umap
Binary file not shown.
Binary file not shown.
Binary file modified Content/PolygonWestern/Meshes/Buildings/Custom/SM_Bank.uasset
Binary file not shown.
Binary file not shown.
Binary file modified Content/PolygonWestern/Meshes/Buildings/Custom/SM_Church.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Content/PolygonWestern/Meshes/Buildings/Custom/SM_Saloon.uasset
Binary file not shown.
Binary file not shown.
Binary file modified Content/PolygonWestern/Meshes/Buildings/Custom/SM_Supply.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Content/PolygonWestern/Meshes/Buildings/Custom/SM_Unnamed.uasset
Binary file not shown.
6 changes: 5 additions & 1 deletion Source/WildWest/Character/Gunman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void AGunman::LookUp(const FInputActionValue& Value)

void AGunman::OpenVault()
{
if (OverlappingVault)
if (OverlappingVault && !OverlappingVault->GetbIsOpened())
{
UWorld* World = GetWorld();
if (World)
Expand Down Expand Up @@ -238,12 +238,15 @@ void AGunman::OpenVault()
if (HasAuthority())
{
OverlappingVault->OpenDoorDelegate.Broadcast();
VaultOpened++;
}
else
{
ServerOpenVault();
}

OverlappingVault->SetbIsOpened(true);

return;
}

Expand Down Expand Up @@ -305,5 +308,6 @@ void AGunman::ServerOpenVault_Implementation()
if (OverlappingVault)
{
OverlappingVault->OpenDoorDelegate.Broadcast();
VaultOpened++;
}
}
3 changes: 3 additions & 0 deletions Source/WildWest/Character/Gunman.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ class WILDWEST_API AGunman : public ACharacter

bool bIsInteracting;

UPROPERTY(BlueprintReadOnly, Category = "Vault", meta = (AllowPrivateAccess = "true"))
int32 VaultOpened;

public:
FORCEINLINE void SetOverlappingVault(AVault* Vault) { OverlappingVault = Vault; }
};
5 changes: 5 additions & 0 deletions Source/WildWest/Props/Vault.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,14 @@ class WILDWEST_API AVault : public AActor

float OpenTimer;

bool bIsOpened;

public:
FORCEINLINE float GetMaxOpenTimer() { return MaxOpenTimer; }

FORCEINLINE float GetOpenTimer() { return OpenTimer; }
FORCEINLINE void SetOpenTimer(float NewTimer) { OpenTimer = NewTimer; }

FORCEINLINE bool GetbIsOpened() { return bIsOpened; }
FORCEINLINE void SetbIsOpened(bool bOpened) { bIsOpened = bOpened; }
};

0 comments on commit 066510a

Please sign in to comment.