mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(glue): implement CCharacterSelection::SetFacing
This commit is contained in:
parent
edf68172ab
commit
c7e2796e1d
@ -10,6 +10,7 @@
|
||||
#include "object/client/Player_C.hpp"
|
||||
#include "ui/CSimpleModelFFX.hpp"
|
||||
|
||||
int32_t CCharacterSelection::s_characterCount;
|
||||
TSGrowableArray<CharacterSelectionDisplay> CCharacterSelection::s_characterList;
|
||||
float CCharacterSelection::s_charFacing;
|
||||
int32_t CCharacterSelection::s_enterWorldIndex;
|
||||
@ -118,7 +119,25 @@ void CCharacterSelection::SetBackgroundModel(const char* modelPath) {
|
||||
}
|
||||
|
||||
void CCharacterSelection::SetFacing(float facing) {
|
||||
// TODO
|
||||
if (!CCharacterSelection::s_characterCount) {
|
||||
return;
|
||||
}
|
||||
|
||||
CCharacterSelection::s_charFacing = facing;
|
||||
|
||||
if (!CCharacterSelection::s_characterList.Count()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto component = CCharacterSelection::s_characterList[CCharacterSelection::s_selectionIndex].component;
|
||||
auto model = component->m_data.model;
|
||||
|
||||
if (!model) {
|
||||
return;
|
||||
}
|
||||
|
||||
C3Vector position = { 0.0f, 0.0f, 0.0f };
|
||||
model->SetWorldTransform(position, facing, 1.0f);
|
||||
}
|
||||
|
||||
void CCharacterSelection::ShowCharacter() {
|
||||
|
||||
@ -18,6 +18,7 @@ struct CharacterSelectionDisplay {
|
||||
class CCharacterSelection {
|
||||
public:
|
||||
// Static variables
|
||||
static int32_t s_characterCount;
|
||||
static TSGrowableArray<CharacterSelectionDisplay> s_characterList;
|
||||
static float s_charFacing;
|
||||
static int32_t s_enterWorldIndex;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user