-
Notifications
You must be signed in to change notification settings - Fork 1
Making Game Components
Jonathan Ackerman edited this page Jan 27, 2018
·
5 revisions
Inside the GameComponents directory,
- add to the PRIVATE section:
${CMAKE_CURRENT_LIST_DIR}/NewComponent.cpp
- and add to the PUBLIC section:
${CMAKE_CURRENT_LIST_DIR}/NewComponent.hpp
In CoreComponentFactoryInitialization.cpp:
- include your new component header file
- add to ctor:
helper.CreateComponentFactory<NewComponent>();
In ScriptBind.cpp:
- include your new component header file
- add to InitializeYTETypes():
InitializeType<NewComponent>();
In your NewComponent:
- make a ctor of the form:
NewComponent(Composition *aOwner, Space *aSpace, RSValue *aProperties)
where:
- aOwner and aSpace are constructed by
Component(aOwner, aSpace)
if you dont have editor properties
- and aProperties is unused by a void cast wrapper
YTEUnusedArgument(aProperties)
if you do then YTEBind etc