Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
HEModdingWiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Sonic Frontiers/Internals/GOComponent
(section)
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Usage == Every GOComponent needs to be first created, this can be done using a simple function found in every [[Sonic Frontiers/Internals/Game Object|Game Object]]:<syntaxhighlight lang="cpp"> // CreateComponent is a function in the hh::game::GameObject class, most oftenly used in the AddCallback function hh::game::GOCVibration* gocVibration = CreateComponent<hh::game::GOCVibration>(); // Creates the component GOCVibration for use </syntaxhighlight>After the creation, you're able to initialize it in anyway possible, do any kind of preparation before adding it to the [[Sonic Frontiers/Internals/Game Object|Game Object]]:<syntaxhighlight lang="cpp"> // AddComponent is a function found in the hh::game::GameObject class, it's most oftenly used in the AddCallback function AddComponent(gocVibration); // Adds the GOCVibration to the Game Object </syntaxhighlight>Full example:<syntaxhighlight lang="cpp"> // Create the GOC app_cmn::rfl::GOCRflParameter* gocRflParam = CreateComponent<app_cmn::rfl::GOCRflParameter>(); // GOC preparation app_cmn::rfl::GOCRflParameter::SetupInfo gocRflParamDesc{}; // Initialize the SetupInfo struct gocRflParamDesc.capacity = 6; gocRflParam->Setup(gocRflParamDesc); // Add the GOC AddComponent(gocRflParam); </syntaxhighlight>
Summary:
Please note that all contributions to HEModdingWiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
HEModdingWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)