Remove Custom objects - Planned for 14.0.0 #15

Closed
opened 2019-03-23 21:16:05 -04:00 by rayaman · 0 comments
rayaman commented 2019-03-23 21:16:05 -04:00 (Migrated from github.com)

A method for Custom objects is unnecessary to say the least. If one wants to create a custom object they simple have to use a few built in methods.

multi:newOBJECTNAME(...)
    local c=self:newBase() -- Returns a table which has the basic features for an [Actor]
    function c:Act() -- Called every step
        -- all actors need an act method
    end
    self:create(c) -- Tells the system that a new object was created! If you don't want this being a thing then feel free to remove this line
    -- Thats it! you can add your own methods to give your object life
    return c
end

This code will be added to documentation and changes.md and readme.md file when the time comes

A method for Custom objects is unnecessary to say the least. If one wants to create a custom object they simple have to use a few built in methods. ```lua multi:newOBJECTNAME(...) local c=self:newBase() -- Returns a table which has the basic features for an [Actor] function c:Act() -- Called every step -- all actors need an act method end self:create(c) -- Tells the system that a new object was created! If you don't want this being a thing then feel free to remove this line -- Thats it! you can add your own methods to give your object life return c end ``` This code will be added to documentation and changes.md and readme.md file when the time comes
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: epicknex/multi#15
No description provided.