skip to content
Orx Learning
User Tools
Admin
Log In
Site Tools
Search
Tools
Show page
Old revisions
Export to PDF
Backlinks
Recent Changes
Media Manager
Sitemap
Log In
>
Recent Changes
Media Manager
Sitemap
Trace:
Welcome
Beginner's Guide
Config
Examples
Tutorials
en:examples:orx_scroll:scrollobjects_and_custom_classes
====== Working with ScrollObjects and Custom Classes ====== ScrollObjects are Class Templates. They provide many functions such as ''OnCreate'', ''Update'', ''OnCollide'' etc. If we had a scroll object class file, say: Spaceship.cpp, and it had been included and properly bound, We could create an instance of our object with: ScrollObject *ship = CreateObject("Spaceship"); This much is all pretty standard. But when you extend the Spaceship class to support extra methods, using ScrollObject as a class type will not give access to the new methods. In order to create an instance of Spaceship, which gives access to all your new methods, you need to use: Spaceship *ship = CreateObject<Spaceship>("Spaceship"); From here you can use other methods like: ship->Land();
en/examples/orx_scroll/scrollobjects_and_custom_classes.txt
ยท Last modified: 2025/09/30 17:26 (9 months ago) by
127.0.0.1
Page Tools
Show page
Old revisions
Backlinks
Export to PDF
Rename Page
Back to top