Jump to content

Sonic Frontiers/Internals/GOComponent: Difference between revisions

From HEModdingWiki
Ashrindy (talk | contribs)
Ashrindy (talk | contribs)
Usage example
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== GOComponent ==
== GOComponent ==
'''GOComponent''' ''(Game Object Component)'' is a part of a very basic '''ECS''' ''(Entity Component System)'' which the '''HE2''' utilizes. GOCs are attached to '''Game Objects''', which add basic functionality or easy control over certain aspects, such as '''GOCVisualModel''' adds an easy way to show a model at the Game Objects position.
'''GOComponent''' ''(Game Object Component)'' is a component that usually has certain functionality to easily access and use systems, methods and such in a game object. GOCs are attached to '''Game Objects''', which add basic functionality or easy control over certain aspects, such as '''GOCVisualModel''' adds an easy way to show a model at the Game Objects position.
 
== 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>


== GOComponents ''(currently in rangers-sdk)'' ==
== GOComponents ''(currently in rangers-sdk)'' ==
Line 97: Line 117:
=== Reflection ===
=== Reflection ===


* GOCRflParameter
* [[Sonic Frontiers/Internals/GOCRflParameter|GOCRflParameter]]


=== Sound ===
=== Sound ===

Latest revision as of 13:56, 13 December 2025

GOComponent[edit | edit source]

GOComponent (Game Object Component) is a component that usually has certain functionality to easily access and use systems, methods and such in a game object. GOCs are attached to Game Objects, which add basic functionality or easy control over certain aspects, such as GOCVisualModel adds an easy way to show a model at the Game Objects position.

Usage[edit | edit source]

Every GOComponent needs to be first created, this can be done using a simple function found in every Game Object:

// 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

After the creation, you're able to initialize it in anyway possible, do any kind of preparation before adding it to the Game Object:

// 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

Full example:

// 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);

GOComponents (currently in rangers-sdk)[edit | edit source]

Animation[edit | edit source]

  • GOCAnimation
  • GOCAnimationBlend
  • GOCAnimationSimple
  • GOCAnimationSingle
  • GOCAnimator
  • GOCCharacterIk
  • GOCLookAt
  • GOCPhysicalAnimation

Boss[edit | edit source]

  • GOCBossActionSelect
  • GOCBossCyloopColliderHelper
  • GOCBossMoveableRange

Collision[edit | edit source]

  • GOCBoxCollider
  • GOCCapsuleCollider
  • GOCColliderQuery
  • GOCCollisionQuery
  • GOCCylinderCollider
  • GOCHeightFieldCollider
  • GOCMeshCollider
  • GOCMoveSphereColliderQuery
  • GOCSphereCollider

Effect[edit | edit source]

  • GOCEffect
  • GOCParticleLocator

Enemy[edit | edit source]

  • GOCAI
  • GOCEnemyAttackSign

General[edit | edit source]

  • GOCActivator
  • GOCContact
  • GOCCyloopPoint
  • GOCEvent
  • GOCEventCollision
  • GOCGravity
  • GOCGrind
  • GOCHealth
  • GOCHitStop
  • GOCNavMeshAgent
  • GOCTargetPositionHelper
  • GOCTransform
  • GOCParamBlackboard
  • GOCScript
  • PathComponent

Graphics[edit | edit source]

  • GOCCamera
  • GOCOcclusionCapsule
  • GOCPointLight
  • GOCRenderTexture
  • GOCVisualDebugDraw
  • GOCVisualModel
  • GOCVisualTransformed
  • GOCVisualUserModel

HID[edit | edit source]

  • GOCInput
  • GOCVibration

Movement[edit | edit source]

  • GOCMotor
  • GOCMotorConstant
  • GOCMotorOnPath
  • GOCMotorRotate
  • GOCMovement

Player[edit | edit source]

  • GOCPlayerCollider
  • GOCPlayerEffect
  • GOCPlayerHsm
  • GOCPlayerKinematicParams
  • GOCPlayerParameter
  • GOCPlayerState
  • GOCPlayerVisual

Reflection[edit | edit source]

Sound[edit | edit source]

  • GOCSound

User Interface[edit | edit source]

  • GOCSprite
  • GOCUICollider
  • GOCUIComposition