Skip to content
This repository was archived by the owner on Jul 24, 2025. It is now read-only.

Using Slingworks Intermediate

JonSnowbd edited this page Sep 27, 2021 · 1 revision

Below I will be going over a few pieces of Slingworks that isn't immediately obvious.

Dynamic Method Signature

When adding methods to be ran by Slingworks via configure, the signature isn't set in stone. The default is usually

pub fn update(self:*Self) void

But adding parameters is an acceptable way to take in information, here is a signature with every bit of information you can get:

pub fn update(self:*Self, id:usize, scene:*sling.Scene) void
  • self is the current object
  • id is the index of self inside of the Self object collection
  • scene is the scene in which this object resides, not the current running scene.

Order doesn't matter for any of the above.

Clone this wiki locally