I'm making a framework where every modulescript represents a type of entity, providin a way to create that entity.
The entity is a table, with properties including a projectile.
I'm going by guesswork, so I should ask whether my method is sensible or not.
Modulescript:
local Entity = {}
function Entity:new()
Entity.Projectile = script.Rocket:Clone()
return self, Entity.EventStream
end
function Entity:main(arguments)
Entity.Projectile.Velocity = arguments.projectileCFrame.lookVector*100
end
return Entity
Entity manager:
local Entity = require(EntityScript):new()
Entity:main(arguments)
|