You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here an example of a robot that could move by a list of actions, adding actions like movement and rotation makes sense:
varrobot: =MovableThing.new();
robot.add_movements(
ActionMove.new(12, 0), # move the thing by 12 on x axys.ActionRotate.new(90), # rotate the thingAction.new() # empty action, it does nothing and we could tell the used this is useless.
);
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The keyword could be used like this:
# script marked as abstract, cannot be instanced.abstractclass_nameSomeClassextendsObject;
# ...
Describe the project you are working on
.
Describe the problem or limitation you are having in your project
.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Can the engine implement abstract classes/scripts like other languages such as java do?
It can help the user to tell the user a specific class is a base class not intended to be used but only to be extended.
It could be implemented adding the
abstract
keyword to a script liketool
does, and should:new()
load()
,preload()
, or globally viaclass_name
Can be used to make a parent class that define only the base code of sub-classes and allow only those sub-classes to be used.
Here an example of a robot that could move by a list of actions, adding actions like movement and rotation makes sense:
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The keyword could be used like this:
Will prevent to instance the abstract class.
But allow extends:
And can be used to implement a list of global constant properties and mark that instancing this object is useless.
Maybe even adding a function to the
Script
object to check if the script has theabstract
flag:If this enhancement will not be used often, can it be worked around with a few lines of script?
.
Is there a reason why this should be core and not an add-on in the asset library?
yes
The text was updated successfully, but these errors were encountered: