Sonic Frontiers/Internals/GOCRflParameter
Appearance
GOCRflParameter located in the app_cmn::rfl namespace, is a simple GOComponent for storing and accessing Reflection parameters through a Game Object.
Usage[edit | edit source]
It follows the same way of creation as every other GOComponent.
The struct of the SetupInfo/Description for this component is simple:
struct SetupInfo {
unsigned int capacity; // The amount of parameters that are going to be used at first
};
This leads to the setup in general being primitive, as all that's needed is to provide the amount of parameters that are gonna be stored at first.
app_cmn::rfl::GOCRflParameter::SetupInfo gocRflParamDesc{}; // Initialize the SetupInfo/Description struct
gocRflParamDesc.capacity = 6; // Specify the amount of parameters that are gonna be used at first
gocRflParam->Setup(gocRflParamDesc); // This sets up the GOComponent for proper usage
Afterwards, you are able to add your Reflection parameters.
hh::fnd::ResReflection* myRefl; // Get or create your Reflection info
gocRflParam->SetParameter(myRefl, 0); // Set the Reflection info to an index, that is then going to be used to access the parameter
To get the Reflection parameters.
MyReflStruct* myRefl = gocRflParam->GetParameter<MyReflStruct>(0); // Get the parameter at index 0 as MyReflStruct