-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Player class (In-Game Name, Wielded Item, Health, Max Health)
- Loading branch information
1 parent
ca1792e
commit 54180bd
Showing
14 changed files
with
108 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#pragma once | ||
#include "SotCore.h" | ||
#include "Player.h" | ||
#include "SOTStuff.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include "pch.h" | ||
#include "Player.h" | ||
namespace SoT | ||
{ | ||
Player::Player(UE4Actor^ actor) : UE4Actor(actor) | ||
{ | ||
|
||
} | ||
|
||
System::String^ Player::getPlayerName() | ||
{ | ||
return gcnew System::String(getActor().GetPlayerState().GetName().c_str()); | ||
} | ||
|
||
System::String^ Player::getWieldedItem() | ||
{ | ||
return gcnew System::String(getActor().GetWieldedItemComponent().GetWieldedItem().GetItemInfo().GetItemDesc().GetName().c_str()); | ||
} | ||
|
||
int Player::getHealth() | ||
{ | ||
return getActor().GetHealthComponent().GetHealth(); | ||
} | ||
|
||
int Player::getMaxHealth() | ||
{ | ||
return getActor().GetHealthComponent().GetMaxHealth(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
#include "Core.h" | ||
#include "UE4ActorWrapper.h" | ||
namespace SoT | ||
{ | ||
public ref class Player : public UE4Actor | ||
{ | ||
public: | ||
Player::Player(UE4Actor^ actor); | ||
System::String^ getPlayerName(); | ||
System::String^ getWieldedItem(); | ||
int getHealth(); | ||
int getMaxHealth(); | ||
|
||
}; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters