-
Notifications
You must be signed in to change notification settings - Fork 19
Library Rangers Player
Gabriel edited this page Sep 26, 2023
·
2 revisions
Provides access to app::player::Player
from Sonic Frontiers, with extensive amounts of helper functions.
Functions;
-
(PlayerType Type, long pGameObject) GetPlayer()
- returns a tuple pertaining to the current player info. -
PlayerType GetPlayerType()
- returns the current character being played as. -
Data* GetPlayerData()
- returns a pointer to an instance ofPlayer.Data
. -
PlayerHsmContext* GetPlayerContext()
- returns a pointer to an instance ofPlayerHsmContext
. -
void SetPlayerType(PlayerType in_playerType)
- sets the current character being played as.
Types;
-
struct Data
- a struct representation ofapp::player::Player
.- Members;
-
GameObject.Data GameObject
- an instance ofhh::game::GameObject
, the base class forapp::player::Player
. -
PlayerHsmContext* pContext
- a pointer to an instance ofPlayerHsmContext
.
-
- Members;
-
struct PlayerHsmContext
- a struct representation ofapp::player::PlayerHsmContext
.- Members;
-
GOCPlayerHsm* pGOCPlayerHsm
- a pointer to an instance ofapp::player::GOCPlayerHsm
. -
long pOutOfControlTimerList
- a pointer to an instance ofapp::player::PlayerHsmContext::OutOfControlTimerList
. -
long pDamagedObjects
- a pointer to an instance ofapp::player::PlayerHsmContext::DamagedObjects
.
-
- Members;
Functions;
-
void SetAnimation(string in_animationName)
- sets an internal*.asm
animation for the current player. -
void SetAnimationParameter(string in_parameterName, float in_value)
- sets an internal*.asm
parameter for the currently playing animation.
Functions;
-
long GetPlugin()
- returns a pointer to an instance ofapp::player::StatePluginCollision
(may be deprecated soon). -
long SetCollisionSphere(CollisionType in_type, float in_radius)
- sets the collision sphere behaviour and radius for the current player. -
void SetEntityCollision(bool in_isEnabled)
- determines whether the player can collide with entities.
Types;
-
enum CollisionType
- an enum representing known collision types for the player.
Functions;
-
void PlayEffect(string in_handleName, string in_effectName)
- plays a*.cemt
effect for the current player, with a handle name to stop the effect at any point. -
void StopEffect(string in_handleName)
- stops a*.cemt
effect using its handle name. -
void PlayAnimationEffect(string in_name)
- plays an internal*.asm
animation effect for the current player. -
void StopAnimationEffects()
- stops all internal*.asm
animation effects.
Functions;
-
bool IsPressed(InputActionType in_actionType)
- returns if the specified input action is receiving a "pressed" signal. -
bool IsDown(InputActionType in_actionType)
- returns if the specified input action is receiving a "down" signal. -
bool IsReleased(InputActionType in_actionType)
- returns if the specified input action is receiving a "released" signal.
Types;
-
enum InputActionType
- an enum representing known action types.
Functions;
-
GOCPlayerKinematicParams* Get()
- returns a pointer to an instance ofGOCPlayerKinematicParams
. -
Vector3 GetForward()
- returns the forward vector of the current player rotation. -
float GetMagnitude()
- returns the magnitude of the current player velocity. -
float GetHorizontalMagnitude()
- returns the horizontal magnitude of the current player velocity.
Functions;
-
int GetMessageID()
- returns the current message ID being processed by the player.
Functions;
-
int PlaySound(string in_soundName)
- plays a sound for the current player with the specified name and returns a sound handle. -
void StopSound(int* in_pSoundHandle)
- stops a sound using its sound handle. -
void PlayVoice(int in_index)
- plays a voice clip at the specified index.
Functions;
-
StateID GetCurrentStateID()
- returns the ID of the current state the player is in. -
StateID GetPreviousStateID(int in_stackIndex = 0)
- returns an ID of a previous state in the stack trace at the specified index. -
(StateID ID, long pData) GetState()
- returns a tuple pertaining to the current state info. -
T* GetState<T>() where T : unmanaged
- returns a pointer to a struct from theStates
library. -
long GetStatePlugin(string in_pluginName)
- returns a pointer to a state plugin by name. -
T* GetStatePlugin<T>() where T : unmanaged
- returns a pointer to a state plugin from thePlugins
library. -
void AddStateNotifyAction(TStateNotifyAction in_action)
- registers a function of theTStateNotifyAction
type into the event handler for when a state is initialised. -
void RemoveStateNotifyAction(TStateNotifyAction in_action)
- removes a function of theTStateNotifyAction
type. -
void Redirect(StateID in_source, StateID in_destination)
- redirects the source state to a different one. -
void Discard(StateID in_source)
- discards a state when it's supposed to be set. -
void Restore(StateID in_source)
- restores a state's behaviour back to default. -
void SetState(StateID in_destination)
- sets the player's current state to the destination state.
Functions;
-
bool IsGrounded()
- returns whether the player is grounded. -
bool IsGroundedSpecial()
- returns whether the player is grounded, on a rail, on a spring or climbing on a wall. -
bool IsDropDashCharge()
- returns whether the player is charging a Drop Dash. -
GOCPlayerParameter.ModePackageType GetModePackageType()
- returns the current player's mode package type. -
bool IsSideView()
- returns whether the player is currently in a 2D section. -
bool IsUnderwater()
- returns whether the player is currently underwater.
- Home
- Codes
-
Libraries
- Getting started
- Features
-
Usage
- Static reference
- Include reference
- Global
- Sonic Frontiers
- Sonic Origins